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 / piyush sachan
DECLARE @List VARCHAR(8000)
SELECT @List = ISNULL(@List + ',', '') +names
FROM NewNew
SELECT @List
Orrrrrr
DECLARE @List VARCHAR(8000)
SELECT @List = COALESCE(@List + ',', '') +names
FROM NewNew
SELECT @List
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how can you check the level of fragmentation on a table? : Sql server administration
What are the different ways you can create databases in sql server?
What is an indexing technique?
What is the difference between left and right outer join?
What does it mean to invest in the index?
What is SQL Azure?
How to retrieve error messages using odbc_errormsg()?
What do you mean by authentication modes in sql server?
What is user-defined functions? What are the types of user-defined functions that can be created?
What is instead of dml trigger?
What are three major types of constraints?
What is the latest version of microsoft sql server?
What is a natural primary key?
What is a join in sql?
how would you improve etl (extract, transform, load) throughput?