-- Create table
create table student
(
id number not null,
name varchar2(20) not null,
username varchar2(20) not null,
password number not null,
sex number not null,
age number not null,
birthday date not null,
create_time timestamp
)
;
-- Add comments to the columns
comment on column student.id
is '主键学生编号';
comment on column student.name
is '学生姓名';
comment on column student.username
is '学生账号';
comment on column student.password
is '学生密码';
comment on column student.sex
is '学生性别(1男0女)';
comment on column student.age
is '学生年龄';
comment on column student.birthday
is '学生生日';
comment on column student.create_time
is '创建时间';
-- Create/Recreate primary, unique and foreign key constraints
alter table student
add constraint pk_student_id primary key (ID);
20210805 学习Oracle 的日常
最新推荐文章于 2023-03-14 10:51:20 发布