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 / ratheesh nellikkal

Hi All,

Here u already have a unique index defined on ACC.NO and ACC.NAME feilds.
Unique index will not allow more than one value for this particular field (Correct me if I am wrong).
Then hw can we get more that one a/c no for a person in this scenario ?

So the answer will be, u can not store more than one a/c number for a person since u have a unique indexes on these table.

Regards,
Ratheesh Nellikal

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?

1938


Who uses db2?

576


Why do we use cursor?

599


How do I add a column to an existing table in db2?

592


Which component is used to execute the sql statements?

621






What is ibm db2 used for?

601


What is reorg and runstats in db2?

696


What is alias in db2?

572


How many databases can be created inside an instance in db2 ?

601


Can you use max on a char column?

638


What are iseries servers?

567


If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?

706


What does runstats do in db2?

607


i want to maintain uniqueness on pdf without make lf??????????

1635


Define check constraint.

644