Oracle Community

The social network for Oracle people

After an Update statement, Sql%NotFound is being validated. Sql%NotFound validates to true even though a record matching the update condition is found. Because of this, the procedure execution Exits. If the Sql%NotFound is commented, then the Record gets updated. Please help me as to any special scenario which is validating Sql%NotFound condition to True.

Views: 51

Reply to This

Replies to This Discussion

After an UPDATE I usually use SQL%ROWCOUNT to check or log the number of rows affected by the update.

The definition of SQL%NOTFOUND is clear, it returns:

  •     NULL if no SELECT or DML statement has run
  •     FALSE if a SELECT statement returned one or more rows or a DML statement affected one or more rows
  •     TRUE otherwise

-- Eddie.

RSS

© 2013   Created by Eddie Awad.

Badges  |  Report an Issue  |  Terms of Service