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後面有分號,否則會有如下提示: