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

Home -> Community -> Usenet -> c.d.o.server -> Re: Renaming a column

Re: Renaming a column

From: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: 1999/01/29
Message-ID: <36B18041.4978@bhp.com.au>#1/1

bastien.piroue_at_gsi-office.de wrote:
>
> Hello,
>
> I want
> a) to change the datatype of a column of a table
> b) to change the name of a column of a table.
>
> I want this for Oracle7, Oracle8 and MS-SQL-Server 6.5 and MS_SQL - Server 7.
> The tables are in use, so that there are rows in it, that the alter table
> alter column - command of ORACLE fails. Any tools, suggestions?
>
> Thank you for any help!
>
> Bastien Piroué, Germany
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

One easy way to "drop a column" is to

  1. rename the table to "table_old"
  2. create a view called "table" with all the columns minus the one you want to drop...

I believe that this would work in all environments and would not involve unloading/reloading data

Cheers

-- 
==============================================
Connor McDonald
BHP Information Technology
Perth, Western Australia
"The difference between me and a madman is that I am not mad"
				- Salvador Dali
Received on Fri Jan 29 1999 - 00:00:00 CST

Original text of this message

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