Oracle-建表student

新建学生表student,并添加数据

 1 -- Create table
 2 create table STUDENT
 3 (
 4   sno       VARCHAR2(3) not null,
 5   sname     VARCHAR2(8) not null,
 6   ssex      VARCHAR2(2) not null,
 7   sbirthday DATE,
 8   class     VARCHAR2(5)
 9 )
10 tablespace TEST
11   pctfree 10
12   initrans 1
13   maxtrans 255
14   storage
15   (
16     initial 64K
17     next 1M
18     minextents 1
19     maxextents unlimited
20   );
21 -- Add comments to the table 
22 comment on table STUDENT
23   is '学生表';
24 -- Add comments to the columns 
25 comment on column STUDENT.sno
26   is '学号(主键)';
27 comment on column STUDENT.sname
28   is '学生姓名';
29 comment on column STUDENT.ssex
30   is '学生性别';
31 comment on column STUDENT.sbirthday
32   is '学生出生年月';
33 comment on column STUDENT.class
34   is '学生所在班级';

结果:

转载于:https://www.cnblogs.com/miss123/p/5567392.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值