Select empno, sal from emptbl where empno < 101.By this
query can we fetch first 100 recs? where empno is primary
key.It won't throw -811 error? if it wont,then what is use
of cursor technique while fetching first 100 recs.


Please need more clarification.

Answer Posted / madhu t

If the to fetch empno and sal from emptble is written in
embedded sql then it will give sqlcode -811.
yes this query fetches first 100 records of employee table.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List down the types of triggers in the db2 database?

593


Can we delete records from view?

566


Where do you specify them?

681


Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference

752


Where can you declare a cursor in a cobol-db2 program?

604






What are foreign keys in db2?

616


What is bind plan?

615


How can the duplicate values be eliminated from db2 select?

633


How will you return the number of records in table?

518


If I have a view which is a join of two or more tables, can this view be updateable?

694


How connect db2 database to datastage?

765


What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?

715


How many databases are there?

593


Which isolation level provides maximum concurrency?

668


What is ibm db2 used for?

601