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 to connect to db2 database from windows command line?
What is collection in db2 bind?
What are db2 tables?
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.
How do I delete a table in db2?
Mention the way of highlighting as well as putting a cursor to use in a cobol program.
Define predicate?
Which command is used to connect to a database in DB2 ? Give the Syntax.
What is a db2 cursor?
What is the use of db2 optimizer?
what is a corelated subquerry?
What is a collection in db2?
by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?
How is deadlock resolved?
What is db2 bind?