1.表的创建

Create table student02(sno number);

  

2.表的删除

Drop table student02;

  

3.表的重命名

Rename student02 to student01;

  

4.表的修改

Alter table student01
--列的修改
Add ob number
Modify ob varchar2(2)
Rename column ob to obnew
Drop column obnew

--约束
Add constraint pk_student01 primary key(sno)
Add constraint uk_student01 unique (sname)
Add constraint fk_student01 foreign key(sno) references student(sno)
Add constraint ck_sno check(sno > 100)
Modify sno not null

Drop constraint fk_student01
Modify sno null;

  

5.索引

Create index ix_student01 on student01(sname);
Drop index ix_student01;

  

6.同义词

Create synonym stu01 for student01;
Drop synonym stu01;

  

 

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2022-01-08
  • 2022-12-23
  • 2021-06-21
  • 2021-11-25
  • 2022-12-23
  • 2021-04-16
猜你喜欢
  • 2022-01-13
  • 2021-06-27
  • 2022-02-14
  • 2022-01-25
  • 2021-11-14
  • 2021-04-18
  • 2021-12-08
相关资源
相似解决方案