← All errors

SQLCODE -150

SQL0150 View, index or table is read-only

IBM message text
View, index, or table &1 in &2 read-only.
SQLCODE
-150
SQLSTATE
42807

Most common cause

INSERT, UPDATE, DELETE or MERGE on a view or logical file that can only be read: DISTINCT, GROUP BY, aggregates, several tables, UNION, all columns computed.

Other causes

  • A DDS join logical file used for updates.
  • A logical file whose fields are all input only.

How to fix it

Make the change on the base table. If you must change data through the view, consider an INSTEAD OF trigger.

Related errors

Text and codes from IBM documentation for 7.6. Checked on .