Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: adding a column to a table
This is a multi-part message in MIME format.
--------------A8DAA73F2B776B09898C1C8A Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit
Martin Meadows wrote:
>
> 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
Hi Martin,
The command should be
Alter table <table_name>
add <column_name> <column definition>
e.g.
Alter table TEST
add ANOTHER_COLUMN varchar2(1)
Note you cannot add a not null column to a table which already contains data.
Hope this helps.
Cheers,
Allan
--------------A8DAA73F2B776B09898C1C8A Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Allan Speir Content-Disposition: attachment; filename="vcard.vcf" begin: vcard fn: Allan Speir n: Speir;Allan org: Motorola SPS adr: Motorola Ltd;;Colvilles Road;East Kilbride;;;Scotland email;internet: Allan_Speir-r31055_at_email.sps.mot.com title: Development Analyst tel;work: +44 1355 566476
--------------A8DAA73F2B776B09898C1C8A-- Received on Wed Nov 26 1997 - 00:00:00 CST
![]() |
![]() |