What error I will get if my select query gives multiple
row while executing a Cobol-DB2 program.How can I solve it
without using a cursor.
Answer Posted / nitin sharma
Hi,
You will get -811 SQLCODE if more than one rows will be
returned by your query.
To avoid this you can also use FETCH FIRST 1 ROWS ONLY in
your query like
SELECT * FROM EMP
FETCH FIRST 1 ROWS ONLY;
Hope this helps.
Nitin
Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What is cursor with hold option in db2?
Is db2 relational database?
What is multi row fetch in db2?
What is deadlock in db2?
How can record locking be achieved in those DB2 versions which do not support it?
in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?
What is access path in db2?
What are types of indexes?
Mention the downsides of page level lock.
What is cursor in dbms?
What is universal database?
What are the two types of logging in the db2 database? Explain them.
What type of database is db2?
What is bind and rebind in db2?
Which are the db2 tools to protect integrity of the database?