Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Delete a column from a table ?
On Thu, 12 Mar 1998 15:57:53 +0100, "Marco Nedermeijer" <m.n.nedermeijer_at_rtd.nl> wrote:
>This may sound stupid, but how can a delete a column from a table ?
>
>Thanks,
>
>Marco Nedermeijer
>m.n.nedermeijer_at_rtd.nl
>
>
You can't. There is no SQL DDL statement for this action. What you can do to achieve the same result is the following:
Say your original table looks like this: create table A
(a varchar2(5) ,b number ,c date
rename table A to org_A
;
create table A as
select a,b from org_A
;
et voila, you have a table A with the structure you wanted. There is however one thing to keep in mind: after doing this you have to re-issue all the grants for table A. When renaming a table the grants go with it.
I hope this works for you. Received on Thu Mar 12 1998 - 00:00:00 CST