How to interchange column name and values in a table
i have 2 columns in a sql table ex name and email id how can i interchange the values?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sukesh MarlaPosted Sep 12, 2012, 1:09 PM
Set Column1=Column2 , Column2=Column1
Check this is correct answer if it helped.
nallyaPosted Sep 12, 2012, 9:21 AM
http://www.mssqltips.com/sqlservertip/1737/swap-sql-server-column-data-due-to-inserting-data-into-wrong-columns/