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

Give the name of some fields form sqlca.

1086


What do you mean by storage group (stogroup)?

1041


What is meant by union and union all?

1012


What is cascading rollback?

1215


what is a corelated subquerry?

1122


What are the full forms of spufi and dclgen and why are they used?

1091


Define predicate?

1139


How is deadlock resolved?

1149


What is db2 bind process?

1241


What is iseries database?

1050


What are the contents of dclgen?

1112


What types of tables are there in the db2 database?

1061


How can the firstname and the lastname from the emp table be concatenated to generate complete names?

1278


What happens in bind step in a db2 program?

974


i want to maintain uniqueness on pdf without make lf??????????

2158