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
What are scheduled tasks in sql server?
Explain steps of normalization?
What is sql server used for?
What are commonly used mssql functions in php?
What is join and name different type of joins?
How to provide default values to stored procedure parameters?
What is optimization and its types?
what are constraints? Explain different types of constraints? : Sql server database administration
How do you make a trace?
What are indexes in sql?
What is multi-statement table-value user-defined function?
Explain forward - only cursors?
How to remove duplicate rows from table?
What are the database objects? : SQL Server Architecture
What are the database roles? : sql server security