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
How to check sequence on a table in db2?
What is the clustering index in the db2 database?
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?
define clustering index.
What is the use of reorg in db2?
What does sqlcabc has?
List down the types of triggers in the db2 database?
What is the syntax for FETCH in DB2 ?
What is the physical storage length of date data type?
What are the different types of base tables?
How will you return the number of records in table?
DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?
How do you eliminate duplicate values in db2?
Define declaration generator (dclgen).
What is commit in db2?