文章詳情頁(yè)
DB2 SELECT語(yǔ)句高級(jí)用法
瀏覽:247日期:2023-03-24 09:22:32
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;
標(biāo)簽:
DB2
相關(guān)文章:
1. DB2 常用命令小結(jié)2. Mybatis select記錄封裝的實(shí)現(xiàn)3. DB2中多種常用功能的解決方法(1)4. 應(yīng)用經(jīng)驗(yàn):關(guān)于IBM DB2數(shù)據(jù)庫(kù)的注意事項(xiàng)5. DB2如何提高IMPORT命令的性能6. DB2 與 Microsoft SQL Server 2000 之間的 SQL 數(shù)據(jù)復(fù)制(1)7. 講解IBM DB2數(shù)據(jù)庫(kù)性能調(diào)整的相關(guān)命令8. 帶你深入了解IBM DB2數(shù)據(jù)庫(kù)的備份與恢復(fù)9. DB2 Spatial Extender 性能調(diào)優(yōu)(1)(1)10. DB2 常用命令速查(備忘)
排行榜

網(wǎng)公網(wǎng)安備