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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: adding col in between....

RE: adding col in between....

From: Pete Sharman <peter.sharman_at_oracle.com>
Date: Tue, 19 Jul 2005 19:43:34 +1000
Message-ID: <20050719194334886.00000000560@psharman-au>













Lies, lies, damn lies!

 

Of course there’s a direct way to do it.  Drop the table and recreate it with the columns in the right order!  ;)

 

Sorry, Lex, couldn’t resist.  I still recall the days of telling people how to do this to speed up their queries since Oracle only unravels a row far enough down the column definitions to get the information you need.  Ah, those were the days!  J

 

 

Pete

 

"Controlling developers is like herding cats."

Kevin Loney, Oracle DBA Handbook

 

"Oh no, it's not.  It's much harder than that!"

Bruce Pihlamae, long-term Oracle DBA


From: oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of Lex de Haan
Sent: Tuesday, 19 July 2005 7:16 PM
To: onkarnath.tiwary@gmail.com; oracle-l@freelists.org
Subject: RE: adding col in between....

 

... and the counter question is: why would you ever want to do this?

this is highly un-relational, because column ordering is supposed to be meaningless.

well, let me answer your question anyway: in Oracle, there is no direct way to accomplish this.

check out the DBMS_REDEFINITION package -- that will do the job for you, if you insist :-)

 

cheers,

Lex.

------------------------------------------------------------------
Steve Adams Seminar
http://www.naturaljoin.nl/events/seminars.html
------------------------------------------------------------------

 

 


From: oracle-l-bounce@freelists.org [mailto:oracle-l-bounce@freelists.org] On Behalf Of Onkar N Tiwary
Sent: Tuesday, July 19, 2005 07:39
To: oracle-l@freelists.org
Subject: adding col in between....

hi all,

 

Is it possible to add a new column in the between of table. For ex. Say there is a table as

 

col position              col name

1                               ID

2                               Name

3                               Address

 

I have to add a col. after NAME col and before ADDRESS col. Is it possible ? how ?

 

TIA

--
Thanks & Regards,
T. Onkar Nath
to_onkar@yahoo.com
onkarnath.tiwary@gmail.com
 

-- http://www.freelists.org/webpage/oracle-l Received on Tue Jul 19 2005 - 04:45:51 CDT

Original text of this message

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