DB2數據庫中SELECT語句高級用法:
1、創建結果表
create table new_table_name as
(select * from table_name) definition only;
2、創建物化查詢表(MQT)
create table new_table_name as
(select * from table_name)
data initially deferred refresh deferred;
refresh table new_table_name;
注意:物化表類似一個查詢,沒有真正形成表,類型顯示為Query。但它完全可以當表來用。
3、復制表結構
create table new_table_name like table_name;