WEB开发网
开发学院数据库DB2 编写操作 DB2 数据的 Web 应用程序(第 1 部分) 阅读

编写操作 DB2 数据的 Web 应用程序(第 1 部分)

 2009-11-06 00:00:00 来源:WEB开发网   
核心提示: CREATETABLE"machinename.TSTCASES"("PROD_ID"CHAR(10)NOTNULL,"PRODUCT"CHAR(30)NOTNULL,"PLATFORM"CHAR(20)NOTNUL

CREATE TABLE "machinename.TSTCASES"("PROD_ID" CHAR(10) NOT NULL, "PRODUCT" CHAR(30) 
NOT NULL,"PLATFORM" CHAR(20) NOT NULL, "NUM_C_AUTO_TCS" INTEGER NOT NULL , 
"NUM_JAVA_AUTO_TCS" INTEGER NOT NULL , "NUM_C64_AUTO_TCS" INTEGER NOT NULL, 
"NUM_C_MANUAL_TCS" INTEGER NOT NULL , "NUM_JAVA_MANUAL_TCS" INTEGER NOT NULL , 
"NUM_C64_MANUAL_TCS" INTEGER NOT NULL, 
"NUM_JSUI_TCS" INTEGER NOT NULL , "NUM_OLT_TCS" INTEGER NOT NULL , 
"NUM_LOGBR_TCS" INTEGER NOT NULL , "NUM_OTHER_TCS" INTEGER NOT NULL) ; 
 
ALTER TABLE "machinename.TSTCASES" ADD PRIMARY KEY ("PROD_ID", "PLATFORM"); 

TSTRSLTS 表是由以下 DB2 命令创建的:

CREATE TABLE "machinename"."TSTRSLTS" ("DRIVER" CHAR(15) NOT NULL, "PLATFORM" 
CHAR(20) NOT NULL, "PROD_ID" CHAR(10) NOT NULL, 
"TEST_MACHINE" CHAR(15) NOT NULL, "JDK_LEVEL" CHAR(15) NOT NULL, "COMPILER_LEVEL" 
CHAR(15) NOT NULL, "OS_LEVEL" CHAR(15) NOT NULL, "NUM_TCS" INTEGER NOT NULL, 
"NUM_PASSED" INTEGER NOT NULL, "DATE_TIME" TIMESTAMP NOT NULL, "C_AUTO_PASSED" 
INTEGER NOT NULL WITH DEFAULT 0, "C_AUTO_FAILED" INTEGER NOT NULL WITH DEFAULT 0, 
"JAVA_AUTO_PASSED" INTEGER NOT NULL WITH DEFAULT 0, "JAVA_AUTO_FAILED" 
INTEGER NOT NULL WITH DEFAULT 0, "C64_AUTO_PASSED" INTEGER NOT NULL 
WITH DEFAULT 0, "C64_AUTO_FAILED" INTEGER NOT NULL WITH DEFAULT 0, 
"C_MANUAL_PASSED" INTEGER NOT NULL WITH DEFAULT 0, "C_MANUAL_FAILED" INTEGER NOT NULL 
WITH DEFAULT 0, "JAVA_MANUAL_PASSED" INTEGER NOT NULL WITH DEFAULT 0, 
"JAVA_MANUAL_FAILED" INTEGER NOT NULL WITH DEFAULT 0, "C64_MANUAL_PASSED" 
INTEGER NOT NULL WITH DEFAULT 0, "C64_MANUAL_FAILED" INTEGER NOT NULL WITH DEFAULT 
0, "JSUI_PASSED" INTEGER NOT NULL WITH DEFAULT 0, "JSUI_FAILED" INTEGER 
NOT NULL WITH DEFAULT 0, "OLT_PASSED" INTEGER NOT NULL WITH DEFAULT 0, 
"OLT_FAILED" INTEGER NOT NULL WITH DEFAULT 0, "LOGBR_PASSED" INTEGER 
NOT NULL WITH DEFAULT 0, "LOGBR_FAILED" INTEGER NOT NULL WITH DEFAULT 0, 
"OTHER_PASSED" INTEGER NOT NULL WITH DEFAULT 0, "OTHER_FAILED" INTEGER 
NOT NULL WITH DEFAULT 0, "LATEST" CHAR(1) NOT NULL WITH DEFAULT 'N'); 
 
    
 
ALTER TABLE "machinename"."TSTRSLTS" ADD CONSTRAINT PRIMARY 
KEY ("DRIVER", "PLATFORM", "PROD_ID", "JDK_LEVEL", "COMPILER_LEVEL", "OS_LEVEL); 
 

上一页  1 2 3 4 5 6 7 8 9 10  下一页

Tags:编写 操作 DB

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接