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

Answer Posted / san

create table san(empid int,empname varchar(10))
insert into san values(1'san')
update san set empid=empname,empname=empid

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

613


What is the difference between a fill factor of 100 and 0?

620


How to rebuild the master database?

679


What does select 1 mean?

630


Can you index views?

582






What are various ways to enhance the ssrs report?

609


Can binary strings be used in arithmetical operations?

604


What is ms sql server triggers?

626


What is an indice?

666


Which are new data types introduced in sql server 2008?

711


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

614


What are diverse clauses that form a part of sql?

681


How to optimize stored procedures in sql server?

722


Can we call stored procedure in view in sql server?

596


What is the difference between getdate and sysdatetime?

631