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...

select distinct(empid),distinct(dept),name
from EMP


will the above query work?

Answer Posted / chidambara subbu

No, It will not work. We can select DISTINCT values for
multiple columns however not all the columns will give
ditint value. For intance , see below table TABLE1
Name City
XXX Chennai
FFF HYD
XXX Blore
YYY Mumbai

1.SELECT DISTINCT NAME FROM TABLE1
Name
XXX
FFF
YYY
2. SELECT DISTINCT NAME,City FROM TABLE1
Name City
XXX Chennai
FFF HYD
XXX Blore
YYY Mumbai

See the result of second query. It has selected duplicate
entry 'XXX' in the Name column.

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 dbrm? What it contains? When it will be created?

991


How to find schema of a table in db2?

950


How do I import a csv file into db2?

936


Which command is used to connect to a database in DB2 ? Give the Syntax.

1029


What is the function of logging in the db2 database?

1067


What is scrollable cursor in db2?

994


What is multi row fetch in db2?

983


Is ibm db2 open source?

1011


What is lock escalation in db2?

963


what is utility for parm lib

2308


Explain the contents that are a part of dclgen.

1032


What is meant by dclgen?

1059


What is sqlca’s maximum length?

1099


Mention the various locks that are available in db2.

973


What is the purpose of rollback and commit?

1084