您的位置:首页 > 运维架构 > Linux

DB29 for Linux,UNIX,and WINDOWS - section 6(DB2 SQL)

2010-03-10 23:13 393 查看
OLD/New/Final Table:

SELECT salary FROM OLD TABLE (

UPDATE employee SET salary = salary* 1.07 WHERE empno= '000220'

);

SQL error msg

Signal Sqlstate '70001'

set message_text='Record not found';

Deletable view.

only one base table,no functions, such as distinct,max,group by and so on.

Trigger:

when insert one row, then update some columns

Create Trigger a after insert on table1

referencing new as N

for each row mode DB2SQL

update table1

Grouping sets/Rollup/Cube/TableSample(Bernoulli)

Values

Values Year('1996');

SYSCAT/SYSIBMADM/SYSSTAT:

db2 "select 'grant select on table '||(tabschema)||'.'||tabname||'to user user1;' from syscat.tables where type='T' and tabschema not in ('SYSIBM','SYSCAT','SYSSTAT','SYSTOOLS')">grant.sql
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐