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 many triggers are possible per table?

1073


What are the differences between DDL, DML and DCL in SQL?

1206


How to rename an existing table with the "sp_rename" stored procedure in ms sql server?

1011


What do we need queues in sql service broker?

1051


What is difference between join and natural join?

943


What are the properties of the transaction?

992


How do you debug a procedure in sql server?

926


What are commonly used odbc functions in php?

1001


How will you optimize a stored procedure optimization?

1014


what's sql server? : Sql server database administration

979


Explain table valued parameters in sql server? Why tvp used?

1001


what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration

1111


Explain an incremental backup?

978


What are the differences between sql server and mysql.

1071


What is 'write-ahead log' in sql server 2000 ?

1031