Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

-811

SQLSTATE 21000NEGATIVE SQLCODE · CHECKED 2026-11-14
Checked against IBM documentation

An embedded SELECT, a subselect in an UPDATE SET clause, or a basic-predicate subquery returned more than one row or value.

QUICK ANSWER

An embedded SELECT, a subselect in an UPDATE SET clause, or a basic-predicate subquery returned more than one row or value.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. The statement's conditions do not narrow the result to one row.
  2. The data contains more matching rows or values than expected.

CHECKED 14 Nov 2026 IBM: Db2 13 - Codes - SQLCODE -811 | Db2 for z/OS 13.0.0

MOST LIKELY

The statement's conditions do not narrow the result to one row.

FIRST CHECK

Examine the statement syntax and conditions.

TRY IT ▸

Site search

What it means

Db2 expected a single row or value but the query produced several, so the statement is not processed.

Typical causes

  • The statement's conditions do not narrow the result to one row.
  • The data contains more matching rows or values than expected.

How to fix it

  1. Examine the statement syntax and conditions.
  2. If the syntax is correct, investigate the data for unexpected duplicates.