Schlüsselwörter
Mithilfe der Schlüsselwörter kann ein DBMS in einer beliebigen Zeichenkette SQL-Befehle, weitere feste Begriffe und ergänzende Angaben unterscheiden.
- Reservierte Begriffe
- Diese werden für SQL-Befehle und ähnliche feststehende Angaben verwendet.
- Nicht-reservierte Begriffe
- Diese sind nach SQL-Standard eigentlich freigegeben und für spezielle Verwendung nur vorbereitet.
In der Praxis macht diese Unterscheidung keinen Sinn; in der folgenden Aufstellung wird sie deshalb nur als Hinweis [res]
bzw. [non]
erwähnt.
Sie sollten Schlüsselwörter niemals für eigene Bezeichner wie Tabellen, Spalten, Prozeduren usw. verwenden! |
A
[res] ABS ALL ALLOCATE ALTER AND ANY ARE ARRAY AS ASENSITIVE ASYMMETRIC AT ATOMIC AUTHORIZATION AVG
[non] A ABSOLUTE ACTION ADA ADD ADMIN AFTER ALWAYS ASC ASSERTION ASSIGNMENT ATTRIBUTE ATTRIBUTES
B
[res] BEGIN BETWEEN BIGINT BINARY BLOB BOOLEAN BOTH BY
[non] BEFORE BERNOULLI BREADTH
C
[res] CALL CALLED CARDINALITY CASCADED CASE CAST CEIL CEILING CHAR CHAR_LENGTH CHARACTER CHARACTER_LENGTH CHECK CLOB CLOSE COALESCE COLLATE COLLECT COLUMN COMMIT CONDITION CONNECT CONSTRAINT CONVERT CORR CORRESPONDING COUNT COVAR_POP COVAR_SAMP CREATE CROSS CUBE CUME_DIST CURRENT CURRENT_DATE CURRENT_DEFAULT_TRANSFORM_GROUP CURRENT_PATH CURRENT_ROLE CURRENT_TIME CURRENT_TIMESTAMP CURRENT_TRANSFORM_GROUP_FOR_TYPE CURRENT_USER CURSOR CYCLE
[non] C CASCADE CATALOG CATALOG_NAME CHAIN CHARACTER_SET_CATALOG CHARACTER_SET_NAME CHARACTER_SET_SCHEMA CHARACTERISTICS CHARACTERS CLASS_ORIGIN COBOL COLLATION COLLATION_CATALOG COLLATION_NAME COLLATION_SCHEMA COLUMN_NAME COMMAND_FUNCTION COMMAND_FUNCTION_CODE COMMITTED CONDITION_NUMBER CONNECTION CONNECTION_NAME CONSTRAINT_CATALOG CONSTRAINT_NAME CONSTRAINT_SCHEMA CONSTRAINTS CONSTRUCTOR CONTAINS CONTINUE CURSOR_NAME
D
[res] DATE DAY DEALLOCATE DEC DECIMAL DECLARE DEFAULT DELETE DENSE_RANK DEREF DESCRIBE DETERMINISTIC DISCONNECT DISTINCT DOUBLE DROP DYNAMIC
[non] DATA DATETIME_INTERVAL_CODE DATETIME_INTERVAL_PRECISION DEFAULTS DEFERRABLE DEFERRED DEFINED DEFINER DEGREE DEPTH DERIVED DESC DESCRIPTOR DIAGNOSTICS DISPATCH DOMAIN DYNAMIC_FUNCTION DYNAMIC_FUNCTION_CODE
E
[res] EACH ELEMENT ELSE END END-EXEC ESCAPE EVERY EXCEPT EXEC EXECUTE EXISTS EXP EXTERNAL EXTRACT
[non] EQUALS EXCEPTION EXCLUDE EXCLUDING
F
[res] FALSE FETCH FILTER FLOAT FLOOR FOR FOREIGN FREE FROM FULL FUNCTION FUSION
[non] FINAL FIRST FOLLOWING FORTRAN FOUND
G
[res] GET GLOBAL GRANT GROUP GROUPING
[non] G GENERAL GENERATED GO GOTO GRANTED
H
[res] HAVING HOLD HOUR
[non] HIERARCHY
I
[res] IDENTITY IN INDICATOR INNER INOUT INSENSITIVE INSERT INT INTEGER INTERSECT INTERSECTION INTERVAL INTO IS
[non] IMMEDIATE IMPLEMENTATION INCLUDING INCREMENT INITIALLY INPUT INSTANCE INSTANTIABLE INVOKER ISOLATION
J
[res] JOIN
K
[non] K KEY KEY_MEMBER KEY_TYPE
L
[res] LANGUAGE LARGE LATERAL LEADING LEFT LIKE LN LOCAL LOCALTIME LOCALTIMESTAMP LOWER
[non] LAST LENGTH LEVEL LOCATOR
M
[res] MATCH MAX MEMBER MERGE METHOD MIN MINUTE MOD MODIFIES MODULE MONTH MULTISET
[non] M MAP MATCHED MAXVALUE MESSAGE_LENGTH MESSAGE_OCTET_LENGTH MESSAGE_TEXT MINVALUE MORE MUMPS
N
[res] NATIONAL NATURAL NCHAR NCLOB NEW NO NONE NORMALIZE NOT NULL NULLIF NUMERIC
[non] NAME NAMES NESTING NEXT NORMALIZED NULLABLE NULLS NUMBER
O
[res] OCTET_LENGTH OF OLD ON ONLY OPEN OR ORDER OUT OUTER OVER OVERLAPS OVERLAY
[non] OBJECT OCTETS OPTION OPTIONS ORDERING ORDINALITY OTHERS OUTPUT OVERRIDING
P
[res] PARAMETER PARTITION PERCENT_RANK PERCENTILE_CONT PERCENTILE_DISC POSITION POWER PRECISION PREPARE PRIMARY PROCEDURE
[non] PAD PARAMETER_MODE PARAMETER_NAME PARAMETER_ORDINAL_POSITION PARAMETER_SPECIFIC_CATALOG PARAMETER_SPECIFIC_NAME PARAMETER_SPECIFIC_SCHEMA PARTIAL PASCAL PATH PLACING PLI PRECEDING PRESERVE PRIOR PRIVILEGES PUBLIC
Q
R
[res] RANGE RANK READS REAL RECURSIVE REF REFERENCES REFERENCING REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY RELEASE RESULT RETURN RETURNS REVOKE RIGHT ROLLBACK ROLLUP ROW ROW_NUMBER ROWS
[non] READ RELATIVE REPEATABLE RESTART RESTRICT RETURNED_CARDINALITY RETURNED_LENGTH RETURNED_OCTET_LENGTH RETURNED_SQLSTATE ROLE ROUTINE ROUTINE_CATALOG ROUTINE_NAME ROUTINE_SCHEMA ROW_COUNT
S
[res] SAVEPOINT SCOPE SCROLL SEARCH SECOND SELECT SENSITIVE SESSION_USER SET SIMILAR SMALLINT SOME SPECIFIC SPECIFICTYPE SQL SQLEXCEPTION SQLSTATE SQLWARNING SQRT START STATIC STDDEV_POP STDDEV_SAMP SUBMULTISET SUBSTRING SUM SYMMETRIC SYSTEM SYSTEM_USER
[non] SCALE SCHEMA SCHEMA_NAME SCOPE_CATALOG SCOPE_NAME SCOPE_SCHEMA SECTION SECURITY SELF SEQUENCE SERIALIZABLE SERVER_NAME SESSION SETS SIMPLE SIZE SOURCE SPACE SPECIFIC_NAME STATE STATEMENT STRUCTURE STYLE SUBCLASS_ORIGIN
T
[res] TABLE TABLESAMPLE THEN TIME TIMESTAMP TIMEZONE_HOUR TIMEZONE_MINUTE TO TRAILING TRANSLATE TRANSLATION TREAT TRIGGER TRIM TRUE
[non] TABLE_NAME TEMPORARY TIES TOP_LEVEL_COUNT TRANSACTION TRANSACTION_ACTIVE TRANSACTIONS_COMMITTED TRANSACTIONS_ROLLED_BACK TRANSFORM TRANSFORMS TRIGGER_CATALOG TRIGGER_NAME TRIGGER_SCHEMA TYPE
U
[res] UESCAPE UNION UNIQUE UNKNOWN UNNEST UPDATE UPPER USER USING
[non] UNBOUNDED UNCOMMITTED UNDER UNNAMED USAGE USER_DEFINED_TYPE_CATALOG USER_DEFINED_TYPE_CODE USER_DEFINED_TYPE_NAME USER_DEFINED_TYPE_SCHEMA
V
[res] VALUE VALUES VAR_POP VAR_SAMP VARCHAR VARYING
[non] VIEW
W
[res] WHEN WHENEVER WHERE WIDTH_BUCKET WINDOW WITH WITHIN WITHOUT
[non] WORK WRITE
X
Y
[res] YEAR
Z
[non] ZONE
Diese Aufstellung wurde übernommen aus SQL-2003 Documents:
- Jim Melton: Information technology – Database languages – SQL – Part 2: Foundation (SQL/Foundation). August 2003. URL: http://www.wiscorp.com/sql_2003_standard.zip (abgerufen am 10. April 2009), darin enthalten 5WD-02-Foundation-2003-09.pdf pp.136