SQL语句: "SELECT service_level, fixpack_num FROM TABLE (sysproc.env_get_inst_info()) as INSTANCEINFO";
ALTER TABLE TABLE2 DROP 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
SQL:
SELECT * FROM SYSIBM.SYSCOLUMNS WHERE TBCREATOR NOT LIKE ‘SYS%’ AND TBNAME = ‘TABLENAME‘ AND KEYSEQ > 0 ORDER BY KEYSEQ ASC;
Getting started with Adobe® Flex® couldn’t be easier. Read this free ebook to:
DB2社区的免费电子书 – Flex快速上手, 尚无中文版.
更多DB2社区的免费电子书: ibm.com/db2/books
直接使用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
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.