94. 如何創建臨時表? 語法: declare global temporary table table_name as (fullselect) definition only excluding identity column attributes on commit delete rows not logged 第一行規定臨時表的名稱. 第二行規定臨時表的列的定義. 第三行規定不是從源結果表定義中復制的恒等列. 第四行規定如果沒有打開with gold光標,將會刪除表的所有行. 第五行規定不對表的改變進行記錄. 例如: declare global temporary table dec_bsempms as (select * from bsempms) definition only excluding identity column attributes on commit delete rows not logged
95. 視圖的管理? 如何創建視圖: create view view_name as select * from table_name where ... 刪除視圖: drop view view_name
96. 如何知道視圖定義的內容? select * from syscat.views中的text列中.
97. 如何創建別名? create alias alias_name for pro_name 后面的pro_name可以是table,view,alias,nickname等.
98. 如何創建序列? 例如: create sequence sequence_name start with start_number increment by value1 nomaxvalue nocycle cache maximum number of sequence values 第一行規定序列的名稱. 第二行規定序列的開始數值. 第三行規定每次新增的幅度. 第四行規定沒有最大數值限制. 第五行規定最大數值限制.
99. 如何更改序列? alter sequence sequence_name ... 可以修改的參數 start with 的 start_number increment 的 value1 nomaxvalue的數值 nocycle屬性 maximum number of sequence values 最大數值