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

if suppose i am having an ACCOUNT table with 3 coloumns ACC.
NO,ACC. NAME,ACC. AMOUNT . If a unique index is also
defined on ACC.NO and ACC.NAME then write a query to
retrieve account holders records who have more than 1 ACC.

Answer Posted / mallikarjun

select distinct ACC.NO,
ACC. NAME,
ACC. AMOUNT

from account
where acc.name in
( select distinct acc.name
from account
group by acc.name
where count(acc.no) > 1)

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to connect to db2 database from windows command line?

1019


What is collection in db2 bind?

976


What are db2 tables?

1067


Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.

2682


How do I delete a table in db2?

1026


Mention the way of highlighting as well as putting a cursor to use in a cobol program.

1036


Define predicate?

1079


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

1050


What is a db2 cursor?

1019


What is the use of db2 optimizer?

1067


what is a corelated subquerry?

1079


What is a collection in db2?

1000


by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?

9051


How is deadlock resolved?

1094


What is db2 bind?

1025