create table testemp( id varchar2(50) default sys_guid(),deptno varchar2(20) ,--部门编码 ename varchar2(20),--人名 sal number(10)--工资 ) ----表名描述comment on table testemp is '测试专用表';----字段备注comment on column testemp.deptno is '部门编码';comment on column testemp…
创建数据库表.添加注释的方法: create table WARNINGRECORD ( RecordID ) primary key not null ); comment on column WARNINGRECORD.RecordID is '告警编号'; 现在想通过pl/sql语句块执行,代码如下: declare tableExist number; begin ) into tableExist from all_tables where TABLE_NAME='WARNINGREC…
CREATE TABLE t1(id varchar2(32) primary key,name VARCHAR2(32) ,age VARCHAR2(32) ) 添加表注释:COMMENT ON table t1 IS '个人信息'; 添加字段注释: comment on column t1.id is 'id'; comment on column t1.name is '姓名';comment on column t1.age is '年龄';…
Mysql 创建表之前判断表是否存在,如果存在则删除已有表 DROP TABLE IF EXISTS sys_area; CREATE TABLE sys_area ( id int NOT NULL AUTO_INCREMENT COMMENT '编号', parent_id varchar(64) NOT NULL COMMENT '父级编号', parent_ids varchar(2000) NOT NULL COMMENT '所有父级编号', name varchar(100) NOT…