Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are scheduled tasks in sql server?

1076


Explain steps of normalization?

995


What is sql server used for?

1041


What are commonly used mssql functions in php?

1073


What is join and name different type of joins?

1045


How to provide default values to stored procedure parameters?

1062


What is optimization and its types?

967


what are constraints? Explain different types of constraints? : Sql server database administration

978


How do you make a trace?

1016


What are indexes in sql?

1273


What is multi-statement table-value user-defined function?

987


Explain forward - only cursors?

1054


How to remove duplicate rows from table?

1242


What are the database objects? : SQL Server Architecture

1041


What are the database roles? : sql server security

1175