Home » SQL & PL/SQL » SQL & PL/SQL » move column position
move column position [message #22233] Mon, 30 September 2002 14:06 Go to next message
JSlick
Messages: 15
Registered: July 2002
Junior Member
can you rearrange the position of columns in an oracle table? for ex, move column 1 to the place of column 3.

i guess i could use a select to copy the table into a new table, but that seems cumbersome.
Re: move column position [message #22234 is a reply to message #22233] Mon, 30 September 2002 15:08 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
The order of the columns in a table should be irrelevent. However, if you feel you must have a different column ordering, you would need to drop and recreate the table.
Re: move column position [message #22248 is a reply to message #22233] Tue, 01 October 2002 06:25 Go to previous message
Su
Messages: 154
Registered: April 2002
Senior Member
Not sure why are you thinking of arranging a column in different position, as the SELECT allows you to list the columns wherever you want them in the output. If still you want to do it so, I think you could create a view of the same table with the columns you want in order and access that view in place of actual table. Even this idea says and does the same I am talking about in above. Check it out.
Good luck :)
Previous Topic: Performance Issue with UNION statement
Next Topic: how to create a trigger using dynamic sql?
Goto Forum:
  


Current Time: Sat May 17 22:50:26 CDT 2025