DB2 SELECT語句高級用法
更新時間:2010年06月25日 19:03:14 作者:
DB2 SELECT語句高級用法,學習db2的朋友可以參考下。
1、創(chuàng)建結果表
create table new_table_nameas
( select * from table_name ) definitiononly;
create table new_table_nameas
( select * from table_name ) definitiononly;
2、創(chuàng)建物化查詢表(MQT)
create table new_table_nameas
( select * from table_name )
datainitially deferred refresh deferred;
refresh table new_table_name;
注意:物化表類似一個查詢,沒有真正形成表,類型顯示為Query。但它完全可以當表來用。
3、復制表結構
create table new_table_name like table_name;
相關文章
創(chuàng)建一個空的IBM DB2 ECO數(shù)據(jù)庫的方法
2008-01-01