Results 1 to 4 of 4

Thread: ROWCOUNT in db2

  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: ROWCOUNT in db2

    Hi,

    I am looking for a function as @@ROWCOUNT(in sql server) does , similar in db2.
    It should return the number of records being affected based on the previous statement.

    can some one help me with this.

    ThanQ

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    Have a look at the GET DIAGNOSTICS statement.
    Regards,
    Mark.

  3. #3
    Join Date
    Jul 2014
    Posts
    294
    Thanks Mark.. got it

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    In PL/SQL context you can use the SQL%ROWCOUNT attribute.
    ---
    "It does not work" is not a valid problem statement.

Tags for this Thread

Posting Permissions

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