Db2 SQL0204N: "SCHEMA.TABLE" is an undefined name (SQLSTATE 42704)
Db2 can't find the table, view or other object, or the schema qualifier is wrong.
SQL0204N is an undefined nameSQL0204N "SCHEMA.TABLE" is an undefined nameSQLCODE=-204, SQLSTATE=42704DB2 SQL Error: SQLCODE=-204 Meaning
Qualify with the schema (MYSCHEMA.ORDERS) or set SET SCHEMA/CURRENT SCHEMA, check case (unquoted names are uppercase), connect to the right database, and confirm the object exists (SELECT * FROM syscat.tables).
Common causes
- Missing or wrong schema qualifier
- Connected to the wrong database
- Case-sensitive quoted name
- Object not created or dropped
- Alias/nickname missing
⚡ Quick fix
SET SCHEMA myschema;or qualify names- Check
syscat.tables - Verify the connected database
Detailed fix by platform
SQL
- sql
SELECT tabschema, tabname FROM syscat.tables WHERE tabname = 'ORDERS'; SET SCHEMA myschema;
How to diagnose
- Schema — Qualified?
- Database — Right one?
- Case — Matches?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in SQL
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026