码迷,mamicode.com
首页 > 数据库 > 详细

Oracle 建表SQL语句

时间:2019-07-19 17:16:30      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:har   code   tab   task   lte   oracle   constrain   col   建表   

ALTER TABLE "USBP_TASK_PROGRESS_STAT"
DROP CONSTRAINT FK_USBP_TAS_REFERENCE_USBP_TAS;

DROP TABLE "USBP_TASK_PROGRESS_STAT" CASCADE CONSTRAINTS;

/*==============================================================*/
/* Table: "USBP_TASK_PROGRESS_STAT" */
/*==============================================================*/
CREATE TABLE "USBP_TASK_PROGRESS_STAT"
(
"STAT_ID"  NUMBER NOT NULL,
"TASK_ID"  NUMBER,
"OBJECT_TYPE_ID"  NUMBER NOT NULL,
"OBJECT_TYPE_NAME"    VARCHAR2(32),
"OBJECT_TYPE_CODE"  VARCHAR2(16),
"TOTAL_OBJECT_NUM"    NUMBER,
"COMPLETE_OBJECT_NUM"  NUMBER,
"SKIP_OBJECT_NUM"  NUMBER,
"UPDATE_TIME"  DATE,
"METERING_UNIT" VARCHAR2(16),
CONSTRAINT PK_USBP_TASK_PROGRESS_STAT PRIMARY KEY ("STAT_ID")
);

COMMENT ON TABLE "USBP_TASK_PROGRESS_STAT" IS
‘任务进度汇总记录表。精细化巡检时记录。记录每类子对象作业完成情况统计数据,生成飞行作业任务时生成初始数据,然后App上传任务进度详细记录后统计更新数据,一般巡检,进度直接记录在"飞行作业任务"表进度字段中‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."STAT_ID" IS
‘记录ID‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."TASK_ID" IS
‘作业记录ID‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."OBJECT_TYPE_ID" IS
‘对象类型ID‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."OBJECT_TYPE_NAME" IS
‘对象类型名称‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."OBJECT_TYPE_CODE" IS
‘对象类型编码‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."TOTAL_OBJECT_NUM" IS
‘巡检对象数量‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."COMPLETE_OBJECT_NUM" IS
‘完成对象数量‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."SKIP_OBJECT_NUM" IS
‘跳过对象数量‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."UPDATE_TIME" IS
‘更新时间‘;

COMMENT ON COLUMN "USBP_TASK_PROGRESS_STAT"."METERING_UNIT" IS
‘计量单位‘;

ALTER TABLE "USBP_TASK_PROGRESS_STAT"
ADD CONSTRAINT FK_USBP_TAS_REFERENCE_USBP_TAS FOREIGN KEY ("TASK_ID")
REFERENCES "USBP_TASK" ("TASK_ID");

Oracle 建表SQL语句

标签:har   code   tab   task   lte   oracle   constrain   col   建表   

原文地址:https://www.cnblogs.com/4AMLJW/p/oracle_create.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!