Reservierte Schlüsselwörter (Setup)
SQL Server verwendet reservierte Schlüsselwörter, um Datenbanken zu definieren, zu bearbeiten und hinzuzufügen. Reservierte Schlüsselwörter sind Teil der Transact-SQL-Grammatik, die von SQL Server verwendet wird, um Transact-SQL-Anweisungen und -Batches zu analysieren und zu verstehen.
SQL Server-Instanznamen dürfen nicht mit einem reservierten Schlüsselwort übereinstimmen. Verwenden Sie die folgende Tabelle, um sicherzustellen, dass reservierte Schlüsselwörter nicht in SQL Server-Instanznamen verwendet werden.
ADD |
EXCEPT |
PERCENT |
ALL |
EXEC |
PLAN |
ALTER |
EXECUTE |
PRECISION |
AND |
EXISTS |
PRIMARY |
ANY |
EXIT |
|
AS |
FETCH |
PROC |
ASC |
FILE |
PROCEDURE |
AUTHORIZATION |
FILLFACTOR |
PUBLIC |
BACKUP |
FOR |
RAISERROR |
BEGIN |
FOREIGN |
READ |
BETWEEN |
FREETEXT |
READTEXT |
BREAK |
FREETEXTTABLE |
RECONFIGURE |
BROWSE |
FROM |
REFERENCES |
BULK |
FULL |
REPLICATION |
BY |
FUNCTION |
RESTORE |
CASCADE |
GOTO |
RESTRICT |
CASE |
GRANT |
RETURN |
CHECK |
GROUP |
REVOKE |
CHECKPOINT |
HAVING |
RIGHT |
CLOSE |
HOLDLOCK |
ROLLBACK |
CLUSTERED |
IDENTITY |
ROWCOUNT |
COALESCE |
IDENTITY_INSERT |
ROWGUIDCOL |
COLLATE |
IDENTITYCOL |
RULE |
COLUMN |
IF |
SAVE |
COMMIT |
IN |
SCHEMA |
COMPUTE |
INDEX |
SELECT |
CONSTRAINT |
INNER |
SESSION_USER |
CONTAINS |
INSERT |
SET |
CONTAINSTABLE |
INTERSECT |
SETUSER |
CONTINUE |
INTO |
SHUTDOWN |
CONVERT |
IS |
SOME |
CREATE |
JOIN |
STATISTICS |
CROSS |
KEY |
SYSTEM_USER |
CURRENT |
KILL |
TABLE |
CURRENT_DATE |
LEFT |
TEXTSIZE |
CURRENT_TIME |
LIKE |
THEN |
CURRENT_TIMESTAMP |
LINENO |
TO |
CURRENT_USER |
LOAD |
TOP |
CURSOR |
NATIONAL |
TRAN |
DATABASE |
NOCHECK |
TRANSACTION |
DBCC |
NONCLUSTERED |
TRIGGER |
DEALLOCATE |
NOT |
TRUNCATE |
DECLARE |
NULL |
TSEQUAL |
DEFAULT |
NULLIF |
UNION |
DELETE |
OF |
UNIQUE |
DENY |
OFF |
UPDATE |
DESC |
OFFSETS |
UPDATETEXT |
DISK |
ON |
USE |
DISTINCT |
OPEN |
USER |
DISTRIBUTED |
OPENDATASOURCE |
VALUES |
DOUBLE |
OPENQUERY |
VARYING |
DROP |
OPENROWSET |
VIEW |
DUMMY |
OPENXML |
WAITFOR |
DUMP |
OPTION |
WHEN |
ELSE |
OR |
WHERE |
END |
ORDER |
WHILE |
ERRLVL |
OUTER |
WITH |
ESCAPE |
OVER |
WRITETEXT |
Darüber hinaus definiert der ISO-Standard eine Liste mit reservierten Schlüsselwörtern. Sie sollten keine dieser in ISO reservierten Schlüsselwörter für Objektnamen und -bezeichner verwenden. Die Liste der reservierten ODBC-Schlüsselwörter, die in der folgenden Tabelle aufgeführt werden, stimmt mit der Liste der reservierten ISO-Schlüsselwörter überein.
Hinweis |
---|
Die Liste der reservierten ISO-Schlüsselwörter kann in einigen Fällen stärker eingeschränkt sein als die von SQL Server, in anderen Fällen dagegen weniger. Beispielsweise enthält die Liste der reservierten ISO-Schlüsselwörter INT. SQL Server behandelt INT nicht als reserviertes Schlüsselwort. |
Reservierte ODBC-Schlüsselwörter
Die folgenden Wörter sind für die Verwendung in ODBC-Funktionsaufrufen reserviert. Diese Wörter schränken die minimale (minimum) SQL-Grammatik nicht ein. Damit jedoch die Kompatibilität mit Treibern sichergestellt ist, die die zentrale (core) SQL-Grammatik unterstützen, sollten Sie diese Schlüsselwörter nach Möglichkeit nicht in SQL Server-Instanznamen verwenden.
ABSOLUTE |
EXEC |
OVERLAPS |
ACTION |
EXECUTE |
PAD |
ADA |
EXISTS |
PARTIAL |
ADD |
EXTERNAL |
PASCAL |
ALL |
EXTRACT |
POSITION |
ALLOCATE |
FALSE |
PRECISION |
ALTER |
FETCH |
PREPARE |
AND |
FIRST |
PRESERVE |
ANY |
FLOAT |
PRIMARY |
ARE |
FOR |
PRIOR |
AS |
FOREIGN |
PRIVILEGES |
ASC |
FORTRAN |
PROCEDURE |
ASSERTION |
FOUND |
PUBLIC |
AT |
FROM |
READ |
AUTHORIZATION |
FULL |
REAL |
AVG |
GET |
REFERENCES |
BEGIN |
GLOBAL |
RELATIVE |
BETWEEN |
GO |
RESTRICT |
BIT |
GOTO |
REVOKE |
BIT_LENGTH |
GRANT |
RIGHT |
BOTH |
GROUP |
ROLLBACK |
BY |
HAVING |
ROWS |
CASCADE |
HOUR |
SCHEMA |
CASCADED |
IDENTITY |
SCROLL |
CASE |
IMMEDIATE |
SECOND |
CAST |
IN |
SECTION |
CATALOG |
INCLUDE |
SELECT |
CHAR |
INDEX |
SESSION |
CHAR_LENGTH |
INDICATOR |
SESSION_USER |
CHARACTER |
INITIALLY |
SET |
CHARACTER_LENGTH |
INNER |
SIZE |
CHECK |
INPUT |
SMALLINT |
CLOSE |
INSENSITIVE |
SOME |
COALESCE |
INSERT |
SPACE |
COLLATE |
INT |
SQL |
COLLATION |
INTEGER |
SQLCA |
COLUMN |
INTERSECT |
SQLCODE |
COMMIT |
INTERVAL |
SQLERROR |
CONNECT |
INTO |
SQLSTATE |
CONNECTION |
IS |
SQLWARNING |
CONSTRAINT |
ISOLATION |
SUBSTRING |
CONSTRAINTS |
JOIN |
SUM |
CONTINUE |
KEY |
SYSTEM_USER |
CONVERT |
LANGUAGE |
TABLE |
CORRESPONDING |
LAST |
TEMPORARY |
COUNT |
LEADING |
THEN |
CREATE |
LEFT |
TIME |
CROSS |
LEVEL |
TIMESTAMP |
CURRENT |
LIKE |
TIMEZONE_HOUR |
CURRENT_DATE |
LOCAL |
TIMEZONE_MINUTE |
CURRENT_TIME |
LOWER |
TO |
CURRENT_TIMESTAMP |
MATCH |
TRAILING |
CURRENT_USER |
MAX |
TRANSACTION |
CURSOR |
MIN |
TRANSLATE |
DATE |
MINUTE |
TRANSLATION |
DAY |
MODULE |
TRIM |
DEALLOCATE |
MONTH |
TRUE |
DEC |
NAMES |
UNION |
DECIMAL |
NATIONAL |
UNIQUE |
DECLARE |
NATURAL |
UNKNOWN |
DEFAULT |
NCHAR |
UPDATE |
DEFERRABLE |
NEXT |
UPPER |
DEFERRED |
NO |
USAGE |
DELETE |
NONE |
USER |
DESC |
NOT |
USING |
DESCRIBE |
NULL |
VALUE |
DESCRIPTOR |
NULLIF |
VALUES |
DIAGNOSTICS |
NUMERIC |
VARCHAR |
DISCONNECT |
OCTET_LENGTH |
VARYING |
DISTINCT |
OF |
VIEW |
DOMAIN |
ON |
WHEN |
DOUBLE |
ONLY |
WHENEVER |
DROP |
OPEN |
WHERE |
ELSE |
OPTION |
WITH |
END |
OR |
WORK |
END-EXEC |
ORDER |
WRITE |
ESCAPE |
OUTER |
YEAR |
EXCEPT |
OUTPUT |
ZONE |
EXCEPTION |
|
|