Check a record IS NOT NULL in plsql

前端 未结 2 1439
生来不讨喜
生来不讨喜 2021-01-01 15:08

I have a function which would return a record with type my_table%ROWTYPE, and in the caller, I could check if the returned record is null, but PL/SQL complains

2条回答
  •  走了就别回头了
    2021-01-01 15:49

    As far as I know, it's not possible. Checking the PRIMARY KEY or a NOT NULL column should be sufficient though.


    You can check for v_record.row_id IS NULL.

    Your function would throw a NO_DATA_FOUND exception though, when no record is found.

提交回复
热议问题