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
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
相关文章推荐
- DB29 for Linux,UNIX,and WINDOWS - section 11(DB2 storage)
- DB29 for Linux,UNIX,and WINDOWS - section 9(DB2 Concurrent)
- DB29 for Linux,UNIX,and WINDOWS - section 12(DB2 data maintenance)
- DB29 for Linux,UNIX,and WINDOWS - section 4(DB2 Security)
- DB29 for Linux,UNIX,and WINDOWS - section 5(DB2 Object)
- DB29 for Linux,UNIX,and WINDOWS - section 1(DB2 product family)
- DB29 for Linux,UNIX,and WINDOWS - section 13(DB2 performance)
- 在 DB2 9.7 for Linux, UNIX, and Windows 上运行 Oracle 应用程序(转)
- DB2 9 for Linux, UNIX, and Windows: DBA Guide, Reference, and Exam Prep (6th Edition)
- DB2 9 for Linux, UNIX, and Windows: DBA Guide, Reference, and, Exam Prep (6th Edition) (Hardcover) Nov.2007.eBook-BBL
- 一种经济有效的使用值压缩 DB2 for Linux,UNIX,and Windows 数据库
- 用 db2pd 工具分析 DB2 for Linux,UNIX,and Windows 中锁的等待并发问题原因
- DB2 for Linux, UNIX, and Windows 最佳实践
- 利用 Oracle 10g 技能学习 DB2 9.1 for Linux, UNIX and Windows
- DB2 SQL PL : Essential Guide for DB2 UDB on Linux, UNIX, Windows, i5/OS, and z/OS, Second Edition
- Advanced DBA certification guide and reference for DB2 universal database v8 for Linux, UNIX, and Wi
- 利用 Oracle 10g 技能学习 DB2 9.1 for Linux, UNIX and Windows
- 为 IBM DB2 for Linux、UNIX and Windows 以及 IBM Content Manager 编写自动安装脚本
- 利用 Oracle 10g 技能学习 DB2 9.1 for Linux, UNIX and Windows
- 转:在 DB2 9.7 for Linux, UNIX, and Windows OLTP 环境中使用 EMC Enterprise Flash Drives 的好处