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 and when does the db2 enforces the unique key?

1143


Which are the db2 tools to protect integrity of the database?

1169


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

1095


What is the role of the data page in the db2 database?

1085


Why do we need reorg in db2?

1047


Discuss about db2 bind?

1158


What is check constraint in db2?

1166


What is the physical storage length of time data type?

1181


Define buffer pool.

1103


What is null value in db2?

1078


What is plan in cobol db2?

1207


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

2268


What is db2 bind process?

1292


What is the difference between plan and package in db2?

1175


What are host variables in db2?

1125