时间:2021-07-01 10:21:17 帮助过:84人阅读
oracle alter语句用法
sql>
sql> create table bar ( n number );table created.
sql>
sql> alter table bar add c char(1);table altered.
sql>
sql> drop table bar;table dropped.
sql>
增加一个日期字段
sql>
sql> create table bar ( n number );table created.
sql>
sql> alter table bar add d date;table altered.
sql>
sql> object_type, status
2 from user_objects
3 where object_name = 'shield'
4 /object_type status
------------------- -------
package valid
package body validsql>
sql> drop table bar;table dropped.
sql>
给己有表的增加字段
sql> -- create demo table
sql> create table employee(
2 id varchar2(4 byte) not null,
3 first_name varchar2(10 byte),
4 last_name varchar2(10 byte),
5 start_date date,
6 end_date date,
7 salary number(8,2),
8 city varchar2(10 byte),
9 description varchar2(15 byte)
10 )
11 /table created.