Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: adding a column to a table
ALTER TABLE <table name> ADD (<column specification>);
example
ALTER TABLE x ADD(y NUMBER(3) NULL);
you can not add not null columns.
you have to add a null columns, give the column a value and modify the
column.
ALTER TABLE x MODIFY(y NOT NULL);
Martin Meadows <mmeadows_at_indy.net> wrote in article
<3478147A.79D6_at_indy.net>...
> 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. The one manual
> I have shows me how to add a row to a table with SQL. Can I add
> a column? If so, how?
>
> Thanks,
> Martin Meadows
>
Received on Sun Nov 23 1997 - 00:00:00 CST