How to swap the data of two columns in a table. both the
columns containing varchar values.

Answer Posted / nilesh

UPdate temp
set col1=col2,
col2=col1

Is This Answer Correct ?    21 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to defragment indexes with alter index ... Reorganize?

667


Explain datetime2 data type in sal server 2008?

613


What protocol does sql server use?

602


State the difference between local and global temporary tables?

689


How can we get count of the number of records in a table?

614






What is the difference between the 2 operating modes of database mirroring?

670


What is a rownum?

588


What is difference between foreign key and unique key?

653


How to provide values to user defined function parameters?

652


Can a table have 2 foreign keys?

584


what's the information that can be stored inside a bit column? : Sql server database administration

613


Define constraints and give an example of their use?

647


What are the differences in Clustering in SQL Server 2005 and 2008 or 2008 R2?

675


How to drop an existing stored procedure in ms sql server?

638


How sql server executes a statement with nested subqueries?

605