扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:Duane Merrill 来源:论坛整理 2007年12月24日
关键字: DB2
在本页阅读全文(共8页)
CONNECT TO AJAXDEMO; ------------------------------------------------ -- DDL Statements for table "NULLID "."HEROES_NOXML" ------------------------------------------------ CREATE TABLE "NULLID "."HEROES_NOXML" ( "HEROID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY ( START WITH +1 INCREMENT BY +1 MINVALUE +1 MAXVALUE +2147483647 NO CYCLE NO CACHE NO ORDER ) , "HERONAME" VARCHAR(50) NOT NULL , "POWER" VARCHAR(255) , "WEAKNESS" VARCHAR(255) , "NOTES" CLOB(1048576) LOGGED NOT COMPACT ) IN "USERSPACE1" ; -- DDL Statements for primary key on Table "NULLID "."HEROES_NOXML" ALTER TABLE "NULLID "."HEROES_NOXML" ADD CONSTRAINT "CC1158547603783" PRIMARY KEY ("HEROID"); ------------------------------------------------ -- DDL Statements for table "NULLID "."HEROES_XML" ------------------------------------------------ CREATE TABLE "NULLID "."HEROES_XML" ( "HEROID" INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY ( START WITH +1 INCREMENT BY +1 MINVALUE +1 MAXVALUE +2147483647 NO CYCLE NO CACHE NO ORDER ) , "HERONAME" VARCHAR(50) NOT NULL , "NOTES" XML ) IN "USERSPACE1" ; -- DDL Statements for primary key on Table "NULLID "."HEROES_XML" ALTER TABLE "NULLID "."HEROES_XML" ADD CONSTRAINT "CC1158547736768" PRIMARY KEY ("HEROID"); COMMIT WORK; CONNECT RESET; TERMINATE; This creates the following two tables: HEROES_NOXML: HEROID, INTEGER (4), IDENTITY, NOT NULLABLE HERONAME, VARCHAR (50), NOT NULLABLE POWER, VARCHAR (255), NULLABLE WEAKNESS, VARCHAR (255), NULLABLE NOTES, CLOB, NULLABLE HEROES_XML: HEROID, INTEGER (4), IDENTITY, NOT NULLABLE HERONAME, VARCHAR (50), NOT NULLABLE NOTES, XML, NULLABLE Populate the first table by copying the SQL code from Listing 2 into your Command Editor. Listing 2: HEROES_NOXML Data INSERT INTO NULLID.HEROES_NOXML (HERONAME, POWER, NOTES) VALUES ('Mockingbird','Can mimic any sound she hears.','Alter ego: Mariah Carey'); INSERT INTO NULLID.HEROES_NOXML (HERONAME, POWER, WEAKNESS, NOTES) VALUES ('Indigo','Telepathy','Gets cranky if he stays up too late.','Current age: 8. Additional weakness: lactose intolerant.'); INSERT INTO NULLID.HEROES_NOXML (HERONAME, POWER, WEAKNESS, NOTES) VALUES ('Indivisibull','Super strength; can reattach severed body parts.','Not too bright.','Secret origin: a somewhat clumsy man, Hank "Bullhead" Durham fell into a vat of fresh glue and was promptly struck by lightning. Since then, whenever he loses a limb, he has simply to hold it in place and the limb becomes reattached.'); INSERT INTO NULLID.HEROES_NOXML (HERONAME, POWER, WEAKNESS, NOTES) VALUES ('Dayglo','Glows under a black light.','Not having a black light around.','Usually relegated to sidekick, though once played a crucial role in a mission busting an underground pot growers cabal.'); INSERT INTO NULLID.HEROES_NOXML (HERONAME, POWER, WEAKNESS, NOTES) VALUES ('Thumbalina','Ability to text message at light speed.','Thumbsucking (a nervous habit in times of great stress).','Former codename: Twiddle.'); |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者