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

What does db2 mean?

957


How to execute stored procedure in db2 command editor?

986


What do you mean by between and in? Is between inclusive of specified range values?

1041


How will you return the number of records in table?

882


What is ibm db2 used for?

1004


What is host variable in db2 cobol?

1032


What are the contents of a dclmgen?

1066


What is performance tuning db2?

1010


What is the clustering index in the db2 database?

958


What are union and union all?

920


How can you count the number of rows from a table tab?

1043


How would you find out the total number of rows in a db2 table?

990


What is the difference between using bind () and rebind () methods of naming class?

1331


How to check last update on table in db2?

1004


What does db2 blu stand for?

1102