DB2 SELECT語(yǔ)句高級(jí)用法
更新時(shí)間:2010年06月25日 19:03:14 作者:
DB2 SELECT語(yǔ)句高級(jí)用法,學(xué)習(xí)db2的朋友可以參考下。
1、創(chuàng)建結(jié)果表
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;
注意:物化表類似一個(gè)查詢,沒(méi)有真正形成表,類型顯示為Query。但它完全可以當(dāng)表來(lái)用。
3、復(fù)制表結(jié)構(gòu)
create table new_table_name like table_name;
相關(guān)文章
DB2 UDB V8.1管理學(xué)習(xí)筆記(二)
DB2 UDB V8.1管理學(xué)習(xí)筆記(二)...2007-03-03CentOS下DB2數(shù)據(jù)庫(kù)安裝過(guò)程詳解
這篇文章主要介紹了CentOS下DB2數(shù)據(jù)庫(kù)安裝過(guò)程詳解,本文步驟詳細(xì),操作的命令也比較全,需要的朋友可以參考下2014-09-09DB2獲取當(dāng)前用戶表、字段、索引等詳細(xì)信息
這篇文章主要介紹了DB2獲取當(dāng)前用戶表、字段、索引等詳細(xì)信息的sql,需要的朋友可以參考下2014-07-07