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

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

1709


have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.

1237


Explain various types of locks in db2?

693


How to retrieve rows from a db2 table in embedded sql?

730


Explain about mirror activator disk mirroring?

560






What is the difference between db2 and oracle?

677


On which levels locks can be applied?

659


Is schema the same as database?

631


What are the various data types available in db2?

634


Give a brief description of db2 isolation levels?

601


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 ?

1714


what is utility for parm lib

1883


What types of tables are there in the db2 database?

556


What is node in db2?

609


Define predicate?

644