ifuleyou 发表于 2016-11-15 08:22:47

DB2建表实例-语句

CREATE TABLE "DB2ADMIN".T_XLGZGL_TYPE (
IDVARCHAR(32)NOT NULLGENERATED BY DEFAULT
AS IDENTITY (START WITH 1, INCREMENT BY 1, CACHE 20,
NO MINVALUE, NO MAXVALUE, NO CYCLE, NO ORDER),
LXMCVARCHAR(32),
XLLXMSVARCHAR(100),
CJZIDVARCHAR(32),
CJSJTIMESTAMP,
CJZSSBMIDVARCHAR(32),
GXZIDVARCHAR(32),
GXSJTIMESTAMP,
GXZSSBMIDVARCHAR(32)
);
ALTER TABLE "DB2ADMIN".T_XLGZGL_TYPE
DATA CAPTURE NONE
PCTFREE 0
LOCKSIZE ROW
APPEND OFF
NOT VOLATILE;
COMMENT ON "DB2ADMIN".T_XLGZGL_TYPE (
ID IS '编号',
LXMC IS '类型名称',
XLLXMS IS '心理类型维护' );
COMMIT;
RUNSTATS ON TABLE "DB2ADMIN".T_XLGZGL_TYPE
ALLOW WRITE ACCESS;
ALTER TABLE "DB2ADMIN"."T_XLGZGL_TYPE"
ADD PRIMARY KEY
("ID");
SET SCHEMA = 'DB2ADMIN';
COMMIT;
页: [1]
查看完整版本: DB2建表实例-语句