加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

oracle 创建表

发布时间:2020-12-12 15:01:19 所属栏目:百科 来源:网络整理
导读:1、oracle创建表 格式:create table xxx ( xxx_id char(10) not null, …… xxx_name char(20) not null, xxx_address char(100) null ) 例:创建客户信息表 CREATE TABLE studens ( studens_id char(10) NOT NULL, studens_name char(50) NOT NULL, studens

1、oracle创建表

格式:create table xxx

(

xxx_id char(10) not null,

……

xxx_name char(20) not null,

xxx_address char(100) null

)

例:创建客户信息表

CREATE TABLE studens

(

studens_id char(10) NOT NULL,

studens_name char(50) NOT NULL,

studens_address char(50) NULL,

studens_city char(50) NULL,

studens_country char(50) NULL,

studens_email char(255) NULL

);

说明:根据需求,预设表字段,针对每个字段设置字符类型,表的列可设置为空或者不为空。

创建表时,最后一个字段定义完毕,null或者not null后面有分号,否则会有如下提示:

wKiom1j6FJ6A-CNhAAAhwX1vDP0968.png-wh_50

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读