Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Location
    mumbai, india
    Posts
    5

    Question Unanswered: How to get rowcount of last select query in db2 stored procedure?

    I want to get the number of rows returned by the last select query, in the db2 stored procedure?
    Bottom line, i want an alternative to sql%rowcount commnd of ORACLE.
    Can any body suggest something

  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186

    This will work.

    Hi,

    1.Declare a variable say COUNTER as Integer.

    DECLARE COUNTER INTEGER;

    2.SELECT COUNT(*) INTO COUNTER FROM db2admin.TABLENAME T WHERE T.COLUMNNAME =(any required condition) ;

    Prashant G Dahalkar
    Prashant

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •