DB2获得当前版本Get Version SQL语句

Categories: Database; Tagged with: ; @ October 3rd, 2010 18:12

SQL语句: "SELECT service_level, fixpack_num FROM TABLE (sysproc.env_get_inst_info()) as INSTANCEINFO";

(more…)

通过ALERT为DB2 TABLE增加/删除主键 ADD/DROP PRIMARY KEY

Categories: Database; Tagged with: ; @ October 3rd, 2010 15:01

Drop Primary Key 移除主键:

ALTER TABLE TABLE2 DROP PRIMARY KEY

Add Primary Key 增加主键:

ALTER TABLE TABLE2 ADD ID2 INTEGER NOT NULL DEFAULT 1;
ALTER TABLE TABLE2 ADD PRIMARY KEY(ID2);

See: http://bytes.com/topic/db2/answers/670160-how-change-primary-key-already-existing-table

DB2获得表内主键 Get PrimaryKeys

Categories: Database; Tagged with: ; @ October 3rd, 2010 14:50

SQL:

SELECT * FROM SYSIBM.SYSCOLUMNS WHERE TBCREATOR NOT LIKE ‘SYS%’ AND TBNAME = ‘TABLENAME‘ AND KEYSEQ > 0 ORDER BY KEYSEQ ASC;

(more…)

FREE ebook – Getting started with Adobe Flex (From IBM DB2) Flex快速入门

Categories: Flex; Tagged with: ; @ October 2nd, 2010 23:28

Getting started with Adobe® Flex® couldn’t be easier. Read this free ebook to:

  • Understand how to build rich internet applications using Flex
  • Learn how to work with Flex Builder to create, run and debug Flex applications
  • Understand how Flex works with Web services and databases like DB2®
  • Learn about the Flex programming basics using MXML® and ActionScript(TM)
  • Get up to speed with powerful features like data binding, view states, and charting
  • Practice with hands-on exercises

DB2社区的免费电子书 – Flex快速上手, 尚无中文版.

Go–> https://www.ibm.com/developerworks/wikis/display/db2oncampus/FREE+ebook+-+Getting+started+with+Adobe+Flex

更多DB2社区的免费电子书:  ibm.com/db2/books

使用JDBC获取DB2的所有表(getTables)

Categories: Database; Tagged with: ; @ October 2nd, 2010 23:15

直接使用metadata.getTables似乎不能获取DB2中指定Database下的所有Table, 但可使用如下语句获取:

"SELECT CREATOR,NAME FROM SYSIBM.SYSTABLES WHERE CREATOR NOT LIKE ‘SYS%’";

参考链接:

View Tables of DB2 Database using JDBC http://bytes.com/topic/db2/answers/704725-view-tables-db2-database-using-jdbc

Newer Posts <-> Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.