1.创建表的语法

   
     create table 表名 (列1 数据类型  1,列2  数据类型)   tablespace  表空间

   SQL:create table student
            ( ID NUMBER  not null,
              NAME VARCHAR2(20)
           );
      表已创建

    1.使用SQL语句创建表

    

      desc  查看表结构

2.   SQL:desc  student;

      1.使用SQL语句创建表

3.  alter table   student add(系号   NUMBER  Not  null);

 1.使用SQL语句创建表
4. 修改列的类型
alter table student  modify(dept varchar2(20));

 1.使用SQL语句创建表
5. 重命名列名称
 
SQL> alter table  student rename column dept to dept01;


6. 删除已有列

  alter table student drop column dept;

1.使用SQL语句创建表

7. 删除数据表

  drop  table student;

 

相关文章:

  • 2021-11-21
  • 2021-08-14
  • 2022-02-18
  • 2021-08-25
  • 2022-02-15
  • 2021-11-21
  • 2021-12-05
  • 2021-05-05
猜你喜欢
  • 2021-05-12
  • 2021-11-21
  • 2021-12-01
  • 2021-11-21
  • 2021-09-10
  • 2021-04-14
  • 2021-12-07
相关资源
相似解决方案