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 / miller
try using Pivot. for details follow the link
http://msdn.microsoft.com/en-us/library/ms177410.aspx link
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the temp table?
write an SQL query to list the employees who joined in the month of January?
Thanks to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
Tell about MOM Tool(Microsoft Operator Manager)?
What's the information that can be stored inside a bit column?
Explain what you mean by 3 tier architecture.
How to list all tables in the database using odbc_tables()?
What is stored in the mssqlsystemresource database? : sql server database administration
What is cursor in ms sql server?
Do you know what is rank function?
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
What is a join in sql?
Where is trigger in sql server?
What is the syntax to execute the sys.dm_db_missing_index_details? : sql server database administration
What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?