SQL Error Messages

From SQLZOO
Revision as of 11:04, 19 July 2012 by Connor (Talk | contribs)

Jump to: navigation, search

Contents

Error Messages

Error messages, how they are caused and what can be done about them.

MySQL

SQL Server

  • <a href='err918/sqlserver'> Msg 1013, Ambiguous column name 'name'. </a>
  • <a href='err934/sqlserver'>Msg 147 An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference. </a>
  • <a href='err942/sqlserver'>Msg 208 Invalid object name 'noSuchTable'</a>
  • <a href='err979/sqlserver'> Msg 8120 Column 'xxx' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. (SQL-42000)</a>

Oracle

  • <a href='err918/oracle'>ORA-00918: column ambiguously defined </a>
  • <a href='err934/oracle'>ORA-00934: group function is not allowed here</a>
  • <a href='err937/oracle'>ORA-00937: not a single-group group function</a>
  • <a href='err942/oracle'>ORA-00942: table or view does not exist</a>
  • <a href='err979/oracle'>ORA-00979: not a GROUP BY expression</a>

DB2

  • <a href='err918/db2'> SQL0203N A reference to column "NAME" is ambiguous. SQLSTATE=42702 </a>
  • <a href='err934/db2'>SQL0120N A WHERE clause, GROUP BY clause, SET clause, or SET transition-variable statement contains a column function. </a>
  • <a href='err942/db2'>SQL0204N "GISQ.NOSUCHTABLE" is an undefined name</a>
  • <a href='err979/db2'>SQL0119N An expression starting with "xxx" specified in a SELECT clause, HAVING clause, or ORDER BY clause is not specified in the GROUP BY clause or it is in a SELECT clause, HAVING clause, or ORDER BY clause with a column function and no GROUP BY clause is specified. SQLSTATE=42803</a>

Postgres

  • <a href='err918/postgres'> Error 7 ERROR: Column reference "name" is ambiguous </a>
  • <a href='err934/postgres'>ERROR: Aggregates not allowed in WHERE clause</a>
  • <a href='err942/postgres'>ERROR: Relation "nosuchtable" does not exist</a>
  • <a href='err979/postgres'>Error 7 ERROR: Attribute xxx.xxx must be GROUPed or used in an aggregate function</a>
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense