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 do you mean by authentication modes in sql server?

1089


What are the benefits of filtered indexes?

1042


What are the differences between triggers and stored procedures?

1070


What is data file in computer?

956


What are the instances when triggers are appropriate?

979


After removing a table from database, what other related objects have to be dropped explicitly?

1064


Why you need indexing? Where that is stored and what you mean by schema object? For what purpose we are using view?

911


How to rebuild indexes with alter index ... Rebuild?

1129


what is a transaction and what are acid properties? : Sql server database administration

1028


What is a database in ms sql server?

1062


What is difference between rownum and row_number?

974


What is the chart in report?

160


What is delete query?

946


You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?

121


How many types of cursor type are there?

1094