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 difference between Datepart() and Datename() in SqlServer?
What is abstracting periodical?
Can group functions be used in the order by clause in ms sql server?
What is a constant or literal in ms sql server?
What is primary key index?
what is hash nonclustered index
How to apply filtering criteria at group level with the having clause in ms sql server?
Explain the cursor lock types?
explain different types of cursors? : Sql server database administration
What is failover clustering overview?
What are policy management terms?
How can delete duplicate records in cte in sql server?
Explain Reporting Life Cycle?
What is meant by referential integrity?
What do you mean by cardinality?