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?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
nallyaRank #8,588 · 219 reputationPosted Sep 12, 2012, 5:21 AM EDT
http://www.mssqltips.com/sqlservertip/1737/swap-sql-server-column-data-due-to-inserting-data-into-wrong-columns/
Sukesh MarlaRank #461 · 5.4K reputationPosted Sep 12, 2012, 9:09 AM EDT
Set Column1=Column2 , Column2=Column1
Check this is correct answer if it helped.