truncate table 文
2007-03-28


oracleにはtruncate table 文というのがあり、テーブルの全データを素早く削除することができますが、InformixもV10からこのtruncate table 文をサポートしてます。

% onstat -

IBM Informix Dynamic Server Version 10.00.FC6 -- On-Line -- Up 00:11:25 -- 39936 Kbytes


% dbaccess testdb -

Database selected.

> select count(*) from test_tbl;


(count(*))

28

1 row(s) retrieved.

> truncate table test_tbl;

Table truncated.

> select count(*) from test_tbl;


(count(*))

0  <<-- ゼロ件になっているのが確認できます

1 row(s) retrieved.
[Informix tips]

コメント(全0件)
コメントをする


記事を書く
powered by ASAHIネット