Oracle 23.26SQLLab-verified · 2026-11-29

ORA-03083: Missing column or expression in the SET clause of an UPDATE statement

The SET list of an UPDATE ends with a comma, so Oracle expects another column = value.

Oracle AI Database 26ai Free 23.26.3.0.0
ORA-03083: Missing column or expression in the SET clause of an UPDATE statement

Jump to a cause

  1. 01Comma left after the last SET item
  2. 02Dynamic SQL loop adds a comma after every item

Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-29 · container image gvenzl/oracle-free:23-slim

ORA-03083 is a newer syntax error for UPDATE statements. When the SET list ends with a comma, Oracle expects one more column = value but finds WHERE. On older versions this mistake was usually reported as ORA-01747 (invalid user.table.column, table.column, or column specification). Both cases below were run on Oracle 26ai Free.

The * marker points at WHERE, but the problem is the comma just before it.

01Comma left after the last SET item

After deleting or reordering lines, sal = 200, kept its comma, so the statement read SET dept = 'HR', sal = 200, WHERE id = 1. SQL*Plus marked WHERE on line 4.

The row was unchanged (SALES, 100). Removing the comma after sal = 200 made the UPDATE work: 1 row updated, now HR and 200.

Setup
Setuprun as lab_a
CREATE TABLE emp (id NUMBER PRIMARY KEY, name VARCHAR2(20), dept VARCHAR2(10), sal NUMBER);
INSERT INTO emp VALUES (1, 'KIM', 'SALES', 100);
COMMIT;
OUTPUT
Table created.


1 row created.


Commit complete.
Reproducerun as lab_a
UPDATE emp
   SET dept = 'HR',
       sal  = 200,
 WHERE id = 1;
✕ ERROR
 WHERE id = 1
 *
ERROR at line 4:
ORA-03083: Missing column or expression in the SET clause of an UPDATE statement
Help: https://docs.oracle.com/error-help/db/ora-03083/
Checkrun as lab_a
SELECT id, dept, sal FROM emp WHERE id = 1;
OUTPUT
        ID DEPT              SAL
---------- ---------- ----------
         1 SALES             100

1 row selected.
After the fixrun as lab_a
UPDATE emp
   SET dept = 'HR',
       sal  = 200
 WHERE id = 1;
SELECT id, dept, sal FROM emp WHERE id = 1;
✓ SUCCESS
1 row updated.


        ID DEPT              SAL
---------- ---------- ----------
         1 HR                200

1 row selected.

02Dynamic SQL loop adds a comma after every item

The loop appended , after each column = value, so the last item also had one: UPDATE emp SET dept = 'HR', sal = 200, WHERE id = 1. ORA-06512: at line 9 pointed to the EXECUTE IMMEDIATE. Printing the statement with DBMS_OUTPUT showed the extra comma.

Adding the comma only before items after the first (IF i > 1) produced SET dept = 'HR', sal = 200 WHERE id = 1, and 1 row was updated.

Setup
Setuprun as lab_a
CREATE TABLE emp (id NUMBER PRIMARY KEY, name VARCHAR2(20), dept VARCHAR2(10), sal NUMBER);
INSERT INTO emp VALUES (1, 'KIM', 'SALES', 100);
COMMIT;
OUTPUT
Table created.


1 row created.


Commit complete.
Reproducerun as lab_a
DECLARE
  TYPE t_cols IS TABLE OF VARCHAR2(100);
  v_cols t_cols := t_cols('dept = ''HR''', 'sal = 200');
  v_set  VARCHAR2(400);
BEGIN
  FOR i IN 1 .. v_cols.COUNT LOOP
    v_set := v_set || v_cols(i) || ', ';
  END LOOP;
  EXECUTE IMMEDIATE 'UPDATE emp SET ' || v_set || ' WHERE id = 1';
END;
/
✕ ERROR
DECLARE
*
ERROR at line 1:
ORA-03083: Missing column or expression in the SET clause of an UPDATE statement
ORA-06512: at line 9
Help: https://docs.oracle.com/error-help/db/ora-03083/
Checkrun as lab_a
SET SERVEROUTPUT ON
DECLARE
  TYPE t_cols IS TABLE OF VARCHAR2(100);
  v_cols t_cols := t_cols('dept = ''HR''', 'sal = 200');
  v_set  VARCHAR2(400);
BEGIN
  FOR i IN 1 .. v_cols.COUNT LOOP
    v_set := v_set || v_cols(i) || ', ';
  END LOOP;
  DBMS_OUTPUT.PUT_LINE('UPDATE emp SET ' || v_set || ' WHERE id = 1');
END;
/
OUTPUT
UPDATE emp SET dept = 'HR', sal = 200,  WHERE id = 1

PL/SQL procedure successfully completed.
After the fixrun as lab_a
SET SERVEROUTPUT ON
DECLARE
  TYPE t_cols IS TABLE OF VARCHAR2(100);
  v_cols t_cols := t_cols('dept = ''HR''', 'sal = 200');
  v_set  VARCHAR2(400);
BEGIN
  FOR i IN 1 .. v_cols.COUNT LOOP
    IF i > 1 THEN
      v_set := v_set || ', ';
    END IF;
    v_set := v_set || v_cols(i);
  END LOOP;
  DBMS_OUTPUT.PUT_LINE('UPDATE emp SET ' || v_set || ' WHERE id = 1');
  EXECUTE IMMEDIATE 'UPDATE emp SET ' || v_set || ' WHERE id = 1';
  DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT || ' row updated');
END;
/
SELECT id, dept, sal FROM emp WHERE id = 1;
✓ SUCCESS
UPDATE emp SET dept = 'HR', sal = 200 WHERE id = 1
1 row updated

PL/SQL procedure successfully completed.


        ID DEPT              SAL
---------- ---------- ----------
         1 HR                200

1 row selected.

FAQ

What replaced ORA-01747 for UPDATE SET errors in Oracle 23ai?

In this 26ai lab, a SET list ending in a comma gave ORA-03083 instead. The message says directly that a column or expression is missing in the SET clause.

Why does the error point at WHERE when WHERE is correct?

Oracle reads the comma, expects another column = value, and finds WHERE. Look at the end of the line before the marked one.

How do I debug ORA-03083 in EXECUTE IMMEDIATE?

Print the final string with DBMS_OUTPUT.PUT_LINE before running it. In this lab the output showed sal = 200, WHERE, the extra comma.

How we verify

Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.

lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0