序号 | 表字段的操作SQL | 说明 |
1 | alter table test_People add(workAddress varchar2(100)); alter table test_People add(workAddress varchar2(100),telNumber varchar2(11)); | ①给test_People表添加一个新字段workAddress类型为varchar2且大小为100; ②给test_People表添加2个新字段(workAddress类型为varchar2且大小为100;telNumber类型为varchar2且大小为11) |
2 | alter table test_People rename column TYPENAME to testname; | 将test_People表的TYPENAME列名称修改为testname |
3 | update test_People set testname=TYPENAME; | 将test_People表中的TYPENAME列的数据更新到testname列中 |
4 | alter table test_People modify TYPENAME VARCHAR2(200); | 将test_People表中的TYPENAME列修改为Varchar2类型且大小为200 |
5 | alter table test_People drop column testname; | 将test_People表中的testname列删除 |