Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: adding a column to a table
You need to use 'allter table' e.g.
SQL> alter table mytable
2> add (mycolumn varchar2(6));
You cannot however add a 'not null' column. If 'not null' is what you want then add your column without specifying 'not null', fill every row in the new column with data, then modify the column to be not null e.g.
SQL> alter table mytable
2> modify (mycolumn varchar2(6) not null);
Good Luck,
Mark H
>This may be a dumb question but here goes anyway. I'm a novice
>Oracle person. I have an Oracle table that needs a column added
>to it. I haven't any good SQL reference manuals.
Received on Sun Nov 23 1997 - 00:00:00 CST
![]() |
![]() |