How to resolve ORA-01710 Error Message in Oracle database

Learn the cause and how to resolve the ORA-01710 error message in Oracle.

Description

When you come across an ORA-01710 error, the following error message will appear:

ORA-01710: missing OF keyword

Cause

You tried to execute a SELECT FOR UPDATE statement, however ignored the OF keyword.

Resolution

The option(s) to resolve this Oracle error are:

Option #1

Re-write the SELECT FOR UPDATE statement so that it follows the following syntax:

CURSOR cursor_name
IS
  select_statement
  FOR UPDATE [of column_list] [NOWAIT];

For example:

CURSOR c1
IS
  SELECT course_number, instructor
  FROM courses_tbl
  FOR UPDATE of instructor;