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 / anandrao

please try this solution also

select count(*),ACC.NO
FROM ACCOUNT
group by ACC.NO
HAVING COUNT(*) > 1

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.

750


What is explain in db2?

656


What is the physical storage length of the data types: date, time, timestamp in the db2 database?

756


before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?

1808


What is buffer pool?

728






What is reorg and runstats in db2?

794


Explain about open switch business continuity software?

668


How does db2 sample database connect?

653


What is db2 optimizer?

868


How do I optimize a query in db2?

710


What is a db2 package?

681


What are the two types of logging in the db2 database? Explain them.

673


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

776


Can you use max on a char column?

718


What are the prerogatives?

701