語句: alter table tableName rename column oldCName to newCName; -- 修改字段名 alter table tableName modify (cloumnName 數(shù)據(jù)類型); -- 修改數(shù)據(jù)類型
例如:
1、創(chuàng)建表: CREATE TABLE Student( id varchar2(32) primary key, name varchar2(8) not null, age number ); 2、修改字段名: alter table Student rename name to StuName; 3、修改數(shù)據(jù)類型: alter table Student modify (id varchar2(64));
|