How to select Distinct columns from the table, table having
20 columns and i want all coulmns
Answer Posted / ram
select * from tablename
select distinct * from tablename
above two select statements give same output with all
column name and also data
if we want only column name & its details(datatype,sizre)
use
select * from
information_schema.columns where table_name='EMP1'
(or)
select distinct * from
information_schema.columns where table_name='EMP1'
(Here Table name mustbe in single quotes and also capital
letters only)
here also both select statements output is same
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between online clustering and Offline clustering?
What is named calculation? : sql server analysis services, ssas
What is the difference between Stored Procedures and triggers?
What is the process of indexing?
you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation
What are subqueries in sql server? Explain its properties.
Explain datetimeoffset data type in sal server 2008?
Can you explain different types of locks in sql server?
How to locate and take substrings with charindex() and substring() functions?
What are system databases into sql server (2005/2008)?
Difference between uniqe index and uniqe constraint?
Should you normalize audio?
Tell me what is fill factor?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
What is inline variable assignment?