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@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Lex de Haan
... 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,
From:
oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Onkar N Tiwary 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 |