How to select Distinct columns from the table, table having
20 columns and i want all coulmns
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / saleem
select *from tablename gives all distinct columns in the
table
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / monal
To select distinct columns you can mention them in the SQL
query and to select all columns you can use select * from
information_schema.columns
| Is This Answer Correct ? | 2 Yes | 8 No |
What is Cross Join
What is difference between drop truncate and delete?
what is the difference between a primary key and a unique key? : Sql server database administration
What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas
What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.
Explain the architecture of ms sql reporting service?
What is the usage of the sign function?
While using a cursor, how can you differentiate between a deleted row and a row that has been inserted with null data values?
create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration
Why truncate is ddl command?
i need some interview questions on sql server developer plz any onee send some links.
what is call by value & call by reference ?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)