开发者

Why do we prefix SQL to the attribute of implicit cursor?

开发者 https://www.devze.com 2023-02-12 06:09 出处:网络
Cursor has four attributes like %rowcount %found %notfound %open Why do we prefix SQL to the attribute of implicit cursor?

Cursor has four attributes like

  • %rowcount
  • %found
  • %notfound
  • %open

Why do we prefix SQL to the attribute of implicit cursor? eg:

 DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT || 'row(s) delete开发者_如何学编程d');


  • Because it's required: if you don't, you'll get a syntax error.
  • Because that's what the name of the implicit cursor is.
  • SQL stands for Structured Query Language, which is the language used to specify a query (or DML) run by a cursor.
  • Because it's only 3 letters to type, as opposed to THE_IMPLICIT_CURSOR_FOR_THE_LAST_SQL_STATEMENT_EXECUTED%ROWCOUNT
  • Because Oracle says so, and that's final :)
0

精彩评论

暂无评论...
验证码 换一张
取 消