SQLSTATE | Description and issuing error classes |
---|
42000 | syntax error or access rule violation |
| AMBIGUOUS_REFERENCE_TO_FIELDS, INVALID_COLUMN_OR_FIELD_DATA_TYPE, INVALID_EXTRACT_BASE_FIELD_TYPE, INVALID_EXTRACT_FIELD_TYPE, INVALID_FIELD_NAME, INVALID_SET_SYNTAX, INVALID_SQL_SYNTAX, NON_PARTITION_COLUMN, NOT_NULL_CONSTRAINT_VIOLATION, NULLABLE_COLUMN_OR_FIELD, NULLABLE_ROW_ID_ATTRIBUTES |
42601 | A character, token, or clause is invalid or missing. |
| IDENTIFIER_TOO_MANY_NAME_PARTS, INVALID_EXTRACT_FIELD, INVALID_FORMAT, PARSE_SYNTAX_ERROR, UNCLOSED_BRACKETED_COMMENT |
42602 | A character that is invalid in a name has been detected. |
| INVALID_IDENTIFIER, INVALID_PROPERTY_KEY, INVALID_PROPERTY_VALUE |
42604 | An invalid numeric or string constant has been detected. |
| EMPTY_JSON_FIELD_VALUE, INVALID_TYPED_LITERAL |
42605 | The number of arguments specified for a scalar function is invalid. |
| WRONG_NUM_ARGS |
42607 | An operand of an aggregate function or CONCAT operator is invalid. |
| NESTED_AGGREGATE_FUNCTION |
42613 | Clauses are mutually exclusive. |
| INCOMPATIBLE_JOIN_TYPES, INVALID_LATERAL_JOIN_TYPE, NON_LAST_MATCHED_CLAUSE_OMIT_CONDITION, NON_LAST_NOT_MATCHED_BY_SOURCE_CLAUSE_OMIT_CONDITION, NON_LAST_NOT_MATCHED_BY_TARGET_CLAUSE_OMIT_CONDITION |
42614 | A duplicate keyword or clause is invalid. |
| REPEATED_CLAUSE |
42617 | The statement string is blank or empty. |
| PARSE_EMPTY_STATEMENT |
42702 | A column reference is ambiguous, because of duplicate names. |
| AMBIGUOUS_COLUMN_OR_FIELD, AMBIGUOUS_LATERAL_COLUMN_ALIAS |
42703 | An undefined column or parameter name was detected. |
| COLUMN_NOT_FOUND, UNRESOLVED_COLUMN, UNRESOLVED_FIELD, UNRESOLVED_MAP_KEY, UNRESOLVED_USING_COLUMN_FOR_JOIN |
42704 | An undefined object or constraint name was detected. |
| AMBIGUOUS_REFERENCE, DEFAULT_DATABASE_NOT_EXISTS, FIELD_NOT_FOUND, INDEX_NOT_FOUND, SCHEMA_NOT_FOUND, UNRECOGNIZED_SQL_TYPE |
42710 | A duplicate object or constraint name was detected. |
| CREATE_TABLE_COLUMN_OPTION_DUPLICATE, INDEX_ALREADY_EXISTS, LOCATION_ALREADY_EXISTS |
42711 | A duplicate column name was detected in the object definition or ALTER TABLE statement. |
| COLUMN_ALREADY_EXISTS |
42723 | A routine with the same signature already exists in the schema, module, or compound block where it is defined. |
| ROUTINE_ALREADY_EXISTS |
42803 | A column reference in the SELECT or HAVING clause is invalid, because it is not a grouping column; or a column reference in the GROUP BY clause is invalid. |
| GROUPING_COLUMN_MISMATCH, GROUPING_ID_COLUMN_MISMATCH, MISSING_AGGREGATION, MISSING_GROUP_BY, UNRESOLVED_ALL_IN_GROUP_BY |
42805 | An integer in the ORDER BY clause does not identify a column of the result table. |
| GROUP_BY_POS_OUT_OF_RANGE, ORDER_BY_POS_OUT_OF_RANGE |
42809 | The identified object is not the type of object to which the statement applies. |
| FORBIDDEN_OPERATION |
42818 | The operands of an operator or function are not compatible or comparable. |
| INCOMPARABLE_PIVOT_COLUMN |
42823 | Multiple columns are returned from a subquery that only allows one column. |
| INVALID_SUBQUERY_EXPRESSION |
42825 | The rows of UNION, INTERSECT, EXCEPT, or VALUES do not have compatible columns. |
| CANNOT_MERGE_INCOMPATIBLE_DATA_TYPE, INCOMPATIBLE_COLUMN_TYPE |
42826 | The rows of UNION, INTERSECT, EXCEPT, or VALUES do not have the same number of columns. |
| NUM_COLUMNS_MISMATCH |
42846 | Cast from source type to target type is not supported. |
| CANNOT_CAST_DATATYPE |
42883 | No routine was found with a matching signature. |
| ROUTINE_NOT_FOUND, UNRESOLVED_ROUTINE |
428C4 | The number of elements on each side of the predicate operator is not the same. |
| UNPIVOT_VALUE_SIZE_MISMATCH |
428EK | The schema qualifier is not valid. |
| TEMP_VIEW_NAME_TOO_MANY_NAME_PARTS |
428FT | The partitioning clause specified on CREATE or ALTER is not valid. |
| PARTITIONS_ALREADY_EXIST, PARTITIONS_NOT_FOUND |
42903 | Invalid use of an aggregate function or OLAP function. |
| GROUP_BY_AGGREGATE, GROUP_BY_POS_AGGREGATE, INVALID_WHERE_CONDITION |
429BB | The data type of a column, parameter, or SQL variable is not supported. |
| CANNOT_RECOGNIZE_HIVE_TYPE |
42K01 | data type not fully specified |
| DATATYPE_MISSING_SIZE, INCOMPLETE_TYPE_DEFINITION |
42K02 | data source not found |
| DATA_SOURCE_NOT_FOUND |
42K03 | File not found |
| PATH_NOT_FOUND, RENAME_SRC_PATH_NOT_FOUND |
42K04 | Duplicate file |
| FAILED_RENAME_PATH, PATH_ALREADY_EXISTS |
42K05 | Name is not valid |
| INVALID_EMPTY_LOCATION, REQUIRES_SINGLE_PART_NAMESPACE |
42K06 | Invalid type for options |
| INVALID_OPTIONS |
42K07 | Not a valid schema literal |
| INVALID_SCHEMA |
42K08 | Not a constant |
| NON_LITERAL_PIVOT_VALUES |
42K09 | Data type mismatch |
| DATATYPE_MISMATCH, PIVOT_VALUE_DATA_TYPE_MISMATCH, UNEXPECTED_INPUT_TYPE, UNPIVOT_VALUE_DATA_TYPE_MISMATCH |
42K0A | Invalid UNPIVOT clause |
| UNPIVOT_REQUIRES_ATTRIBUTES, UNPIVOT_REQUIRES_VALUE_COLUMNS |
42K0B | Legacy feature blocked |
| INCONSISTENT_BEHAVIOR_CROSS_VERSION |
42KD9 | Cannot infer table schema. |
| UNABLE_TO_INFER_SCHEMA |
42P01 | undefined_table |
| TABLE_OR_VIEW_NOT_FOUND, VIEW_NOT_FOUND |
42P02 | undefined_parameter |
| UNBOUND_SQL_PARAMETER |
42P06 | duplicate_schema |
| SCHEMA_ALREADY_EXISTS |
42P07 | duplicate_table |
| TABLE_OR_VIEW_ALREADY_EXISTS, TEMP_TABLE_OR_VIEW_ALREADY_EXISTS, VIEW_ALREADY_EXISTS |
42P20 | windowing_error |
| UNSUPPORTED_EXPR_FOR_WINDOW |