Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Privileges for Services on Windows NT 4.0
In article <33c24aac.12701143_at_clientnews.wisper.net>, ceri_at_n-ary.com
says...
> Hi,
>
> I know this may seem a stupid question, but I am using Oracle 7.3 for
> NT, and I am having dificulty altering the table.
> I have two columns in the middle of a table, I wish to move to the
> end, I cant seem to reorder using the Navigator or SQLPLUS.
> I have tried removing and adding them in, but cant seem to find the
> correct SQL to allow me to do this.
> Please could you advise me the correct SQL for dropping a non-key
> column from a table?
> Thanks
> Ceri Moran
>
Simply put, you can't drop columns from Oracle tables.
You must drop the table and recreate it without the infernal columns.
Alternatively, you may create a table (say X) with the same structure
as the original table (say Z) but without those columns, then select the
desired columns from table Z into table X thus populating it with all
rows from Z. Now drop table Z and rename table X to table Z and you have
accomplished the "dropping" of columns from a table. All grants that
existed on the original table must be regranted, etc.
Craig M. Wall Received on Wed Jul 09 1997 - 00:00:00 CDT