Which SQL statement is used to declare a cursor in DB2?

  • CLOSE CURSOR
  • DECLARE CURSOR
  • FETCH CURSOR
  • OPEN CURSOR
The DECLARE CURSOR statement is used to declare a cursor in DB2. This statement defines the result set for the cursor, specifying the SELECT statement that will be used to retrieve rows. Once declared, the cursor can be opened, fetched, and closed to process the rows returned by the associated query. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *