Oracle 9i Tutorial

Oracle 9i Tutorial : ALTER TABLE Statement

 ALTER TABLE Statement

         After you create a table, you may need to change the table structure because: you omitted column, your column definition needs to be changed, or you need to remove columns. You can do this by using the ALTER TABLE statement.
Use the ALTER TABLE statement to:
Add a new column
Alter table employee add(manager number(4));
Modify an existing column
Alter table employee modify(empname varchar2(10));
Define a default value for the new column
Alter table employee modify(hiredate date default sysdate);
Drop a column
                     – Alter table employee drop column manager;

Leave a Reply