oracle 创建表

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后面有分号,否则会有如下提示:

      oracle 创建表