Home » SQL & PL/SQL » SQL & PL/SQL » how to alter columns (oracle9i,windows)
how to alter columns [message #361153] Tue, 25 November 2008 03:47 Go to next message
pothurai
Messages: 4
Registered: September 2008
Location: anantapur
Junior Member

please i want to know how to alter the columns in a table
Re: how to alter columns [message #361162 is a reply to message #361153] Tue, 25 November 2008 04:24 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member


ALTER TABLE

Smile
Rajuvan
Re: how to alter columns [message #363126 is a reply to message #361162] Fri, 05 December 2008 02:53 Go to previous messageGo to next message
pothurai
Messages: 4
Registered: September 2008
Location: anantapur
Junior Member

i want to interchange the columns in a table
Re: how to alter columns [message #363131 is a reply to message #363126] Fri, 05 December 2008 03:03 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
hi,

while creating forms reports pages you shall interchange to your taste. still if you insist, create another table and rename to your taste
Re: how to alter columns [message #363232 is a reply to message #363126] Fri, 05 December 2008 08:00 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
pothurai wrote on Fri, 05 December 2008 03:53
i want to interchange the columns in a table


No point. Please read up on the concepts of a Relational Database. There is no order to data in a table and the order of columns in a table makes no difference.

Select the data you want in the order you want.
Re: how to alter columns [message #383091 is a reply to message #363131] Tue, 27 January 2009 04:22 Go to previous messageGo to next message
pothurai
Messages: 4
Registered: September 2008
Location: anantapur
Junior Member

sir,i want to interchange the columns of a table in the database but not in the reports
Re: how to alter columns [message #383094 is a reply to message #383091] Tue, 27 January 2009 04:26 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Please re-read joy_division's post. The order of your columns is irrelevant in this context.
Re: how to alter columns [message #383095 is a reply to message #383091] Tue, 27 January 2009 04:27 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Perhaps we are missing the point here. What do you mean when you say you want to 'interchange' the columns. Can you give a small example?

MHE

Re: how to alter columns [message #383096 is a reply to message #383091] Tue, 27 January 2009 04:27 Go to previous message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why would you want to do that?

One solution is to create a new table as select of columns in desired order from an old table, then drop the old table and rename newly created one into the old table name.

Another one is to create an empty table, order columns in desired order, insert existing data into a newly created table, drop the old one, rename a new one.

etc.

There are ways to do that, but - what about privileges you have granted to other users? Database triggers? Stored procedures which will be invalidated once you drop a table?

Zillion problems for no reason (unless, of course, there really IS a very good reason for doing that). So, what is YOUR reason?
Previous Topic: Is It Possible???
Next Topic: which is faster
Goto Forum:
  


Current Time: Tue Dec 06 06:40:35 CST 2016

Total time taken to generate the page: 0.08485 seconds