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
How and when does the db2 enforces the unique key?
Which are the db2 tools to protect integrity of the database?
How would you find out the total number of rows in a db2 table?
What is the role of the data page in the db2 database?
Why do we need reorg in db2?
Discuss about db2 bind?
What is check constraint in db2?
What is the physical storage length of time data type?
Define buffer pool.
What is null value in db2?
What is plan in cobol db2?
How can you validate Sql errors during cursor operation in db2 pgms and where do you code?
What is db2 bind process?
What is the difference between plan and package in db2?
What are host variables in db2?