Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: adding a column to a table

Re: adding a column to a table

From: Mark Hunter <mark_at_se7en.demon.co.uk>
Date: 1997/11/23
Message-ID: <34796e8f.3714103@news.demon.co.uk>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US