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

What is normalization according to you and explain its different levels?

957


Why we use functions in sql server?

1085


What is the difference between createstatement and preparedstatement?

948


Suppose you want to implement the following relationships while designing tables. How would you do it?a.) One-to-oneb.) One-to-manyc.) Many-to-many

944


How to use column default values in insert statements in ms sql server?

1041


What is similarity and difference between truncate and delete in sql?

1103


What is a primary key?

955


What is the need for indexing?

955


Which sql server is best?

1000


How can a database be repaired?

997


What is ssl in sql server?

1083


How to connect Azure federated root database and apply federation in entity framework?

107


What is ddl and dml commands?

911


What is the ‘fillfactor’?

973


How do I view a trc file?

946