How to swap the data of two columns in a table. both the
columns containing varchar values.
Answer Posted / ami tkumar
Sorry for previous answer.
DECLARE @temp AS varchar(50)
UPDATE swapdata SET @temp=value2,value2=value1,value1=@temp
Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
Tell me what is the significance of null value and why should we avoid permitting null values?
Does index slows down insert statements?
How do triggers work?
Explain an incremental backup?
What structure can you implement for the database to speed up table reads?
What is sql server profiler?
What is the use of set nocount on/off statement?
How do you clear a log file?
What is difference between after and before?
Explain in brief how sql server enhances scalability of the database system?
explain extended properties
What is meant by dirty read?
How do I start sql server?
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?
Write a sql query to get zero records from a table having n number of records?