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...

there is a table having two columns no and name
and the data is
1 A
2 B
3 C

write a query that will result a horizontal output
A,B,C

Answer Posted / b

Select case when 1 then 'A'
when 2 then 'B'
when 3 then 'C' end as Name from tablename

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to enter date and time literals in ms sql server?

952


Why do we backup Active Directory ?

995


What is correlated subquery in sql server?

1016


What are the properties and different types of sub-queries?

958


Can we shrink data file in sql server?

997


How to get the number of affected rows?

949


What is raid? : SQL Server Architecture

1101


What is snapshot replication?

998


Can you explain different types of locks in sql server?

911


Do you know what is normalization of database? What are its benefits?

1028


What is identity?

947


What are the drawbacks of reporting in ssrs?

141


What is simple indexing method?

969


How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

1053


What do you mean by normalisation?

962