Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: adding col in between....
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
![]() |
![]() |