Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between online clustering and Offline clustering?

2475


What is named calculation? : sql server analysis services, ssas

1024


What is the difference between Stored Procedures and triggers?

1133


What is the process of indexing?

1052


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

997


What are subqueries in sql server? Explain its properties.

1068


Explain datetimeoffset data type in sal server 2008?

972


Can you explain different types of locks in sql server?

992


How to locate and take substrings with charindex() and substring() functions?

1073


What are system databases into sql server (2005/2008)?

1047


Difference between uniqe index and uniqe constraint?

1045


Should you normalize audio?

1004


Tell me what is fill factor?

1012


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?

2167


What is inline variable assignment?

1082