Click here to Skip to main content
15,917,862 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Friends,

How to add column between two column in sql

Regards,
AP
Posted

You can't actually do that - you would have to build a temporary table, transfer the information over, and then rebuild the old table from the temporary.

Having said that, column order should not matter anyway - unless you are using "SELECT * FROM ..." and relying on column number in the returned data, which is a very, very silly thing to do in the first place!

What are you trying to achieve that you think this is necessary, and a good idea?
 
Share this answer
 
Comments
VJ Reddy 15-May-12 5:13am    
Good answer. 5!
Manas Bhardwaj 15-May-12 8:19am    
nicely explained. +5
Arunprasath Natarajan 16-May-12 5:24am    
Thank you all...
Just use ALTER TABLE[^] command.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900