Reserverade ord i Access och SQL
Förord
Vilka är de reserverade orden i Access, ODBC och T-SQL? I den här artikeln tänker jag bara ta upp vilka ord som är reserverade i Access, ODBC och T-SQL.Följande tre tabeller visar de ord som är reserverade och bör inte användas som namn för kolumner, tabeller, Alias eller andra användar deklarerade variabler och objekt. Får du ett Syntax fel beror det oftast på att du har använt ett reserverat ord.
Innehåll
Notera att 'password' ger ett 0x80040E14 när det används i en Access tabell, trots att det egentligen inte refereras till något av de reserverade ord listor som finns.
Access
ODBC
Transact-SQL
Access
ADD | ALL | ALPHANUMERIC | ALTER | AND |
ANY | APPLICATION | AS | ASC | ASSISTANT |
AUTOINCREMENT | AVG | BETWEEN | BINARY | BIT |
BOOLEAN | BY | BYTE | CHAR | CHARACTER |
COLUMN | COMPACTDATABASE | CONSTRAINT | CONTAINER | COUNT |
COUNTER | CREATE | CREATEDATABASE | CREATEFIELD | CREATEGROUP |
CREATEINDEX | CREATEOBJECT | CREATEPROPERTY | CREATERELATION | CREATETABLEDEF |
CREATEUSER | CREATEWORKSPACE | CURRENCY | CURRENTUSER | DATABASE |
DATE | DATETIME | DELETE | DESC | DESCRIPTION |
DISALLOW | DISTINCT | DISTINCTROW | DOCUMENT | DOUBLE |
DROP | ECHO | ELSE | END | EQV |
ERROR | EXISTS | EXIT | FALSE | FIELD |
FIELDS | FILLCACHE | FLOAT | FLOAT4 | FLOAT8 |
FOREIGN | FORM | FORMS | FROM | FULL |
FUNCTION | GENERAL | GETOBJECT | GETOPTION | GOTOPAGE |
GROUP | GROUP BY | GUID | HAVING | IDLE |
IEEEDOUBLE | IEEESINGLE | IF | IGNORE | IMP |
IN | INDEX | INDEXES | INNER | INSERT |
INSERTTEXT | INT | INTEGER | INTEGER1 | INTEGER2 |
INTEGER4 | INTO | IS | JOIN | KEY |
LEFT | LEVEL | LIKE | LOGICAL | LOGICAL1 |
LONG | LONGBINARY | LONGTEXT | MATCH | MAX |
MIN | MOD | MEMO | MONEY | MOVE |
NAME | NEWPASSWORD | NO | NOT | NULL |
NUMBER | NUMERIC | OBJECT | OLEOBJECT | OFF |
ON | OPENRECORDSET | OPTION | OR | ORDER |
OUTER | OWNERACCESS | PARAMETER | PARAMETERS | PARTIAL |
PERCENT | PIVOT | PRIMARY | PROCEDURE | PROPERTY |
QUIT | REAL | RECALC | RECORDSET | REFERENCES |
REFRESH | REFRESHLINK | REGISTERDATABASE | RELATION | REPAINT |
REPAIRDATABASE | REPORTS | REQUERY | RIGHT | SCREEN |
SECTION | SELECT | SET | SETFOCUS | SETOPTION |
SHORT | SINGLE | SMALLINT | SOME | SQL |
STDEV | STDEVP | STRING | SUM | TABLE |
TABLEDEF | TABLEDEFS | TABLEID | TEXT | TIME |
TIMESTAMP | TOP | TRANSFORM | TRUE | UNION |
UNIQUE | UPDATE | VALUE | VALUES | VAR |
VARP | VARBINARY | VARCHAR | WHERE | WITH |
WORKSPACE | XOR | YES | YESNO |
ODBC
ABSOLUTE | ACTION | ADA | ADD | ADD |
ALL | ALLOCATE | ALTER | AND | ANY |
ARE | AS | ASC | ASSERTION | AT |
AUTHORIZATION | AVG | BEGIN | BETWEEN | BIT |
BIT_LENGTH | BOTH | BY | CASCADE | CASCADED |
CASE | CAST | CATALOG | CHAR | CHAR_LENGTH |
CHARACTER | CHARACTER_LENGTH | CHECK | CLOSE | COALESCE |
COLLATE | COLLATION | COLUMN | COMMIT | CONNECT |
CONNECTION | CONSTRAINT | CONSTRAINTS | CONTINUE | CONVERT |
CORRESPONDING | COUNT | CREATE | CROSS | CURRENT |
CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR |
DATE | DAY | DEALLOCATE | DEC | DECIMAL |
DECLARE | DEFAULT | DEFERRABLE | DEFERRED | DELETE |
DESC | DESCRIBE | DESCRIPTOR | DIAGNOSTICS | DISCONNECT |
DISTINCT | DOMAIN | DOUBLE | DROP | ELSE |
END | END-EXEC | ESCAPE | EXCEPT | EXCEPTION |
EXEC | EXECUTE | EXISTS | EXIT | EXTERNAL |
EXTRACT | FALSE | FETCH | FIRST | FLOAT |
FOR | FOREIGN | FORTRAN | FOUND | FROM |
FULL | GET | GLOBAL | GO | GOTO |
GRANT | GROUP | HAVING | HOUR | IDENTITY |
IMMEDIATE | IN | INCLUDE | INDEX | INDICATOR |
INITIALLY | INNER | INPUT | INSENSITIVE | INSERT |
INT | INTEGER | INTERSECT | INTERVAL | INTO |
IS | ISOLATION | JOIN | KEY | LANGUAGE |
LAST | LEADING | LEFT | LEVEL | LIKE |
LOCAL | LOWER | MATCH | MAX | MIN |
MINUTE | MODULE | MONTH | NAMES | NATIONAL |
NATURAL | NCHAR | NEXT | NO | NONE |
NOT | NULL | NULLIF | NUMERIC | OCTET_LENGTH |
OF | ON | ONLY | OPEN | OPTION |
OR | ORDER | OUTER | OUTPUT | OVERLAPS |
PAD | PARTIAL | PASCAL | POSITION | PRECISION |
PREPARE | PRESERVE | PRIMARY | PRIMARY | PRIOR |
PRIVILEGES | PROCEDURE | PUBLIC | READ | REAL |
REFERENCES | RELATIVE | RESTRICT | REVOKE | RIGHT |
ROLLBACK | ROWS | SCHEMA | SCROLL | SECOND |
SECTION | SELECT | SESSION | SESSION_USER | SET |
SIZE | SMALLINT | SOME | SPACE | SQL |
SQLCA | SQLCODE | SQLERROR | SQLSTATE | SQLWARNING |
SUBSTRING | SUM | SYSTEM_USER | TABLE | TEMPORARY |
THEN | TIME | TIMESTAMP | TIMEZONE_HOUR | TIMEZONE_MINUTE |
TO | TRAILING | TRANSACTION | TRANSLATE | TRANSLATION |
TRIM | TRUE | UNION | UNIQUE | UNKNOWN |
UPDATE | UPPER | USAGE | USER | USING |
VALUE | VALUES | VARCHAR | VARYING | VIEW |
WHEN | WHENEVER | WHERE | WITH | WORK |
WRITE | YEAR | ZONE |
Transact-SQL
ADD | ALL | ALTER | AND | ANY |
AS | ASC | AUTHORIZATION | AVG | BACKUP |
BEGIN | BETWEEN | BREAK | BROWSE | BULK |
BY | CASCADE | CASE | CHECK | CHECKPOINT |
CLOSE | CLUSTERED | COALESCE | COLUMN | COMMIT |
COMMITTED | COMPUTE | CONFIRM | CONSTRAINT | CONTAINS |
CONTAINSTABLE | CONTINUE | CONTROLROW | CONVERT | COUNT |
CREATE | CROSS | CURRENT | CURRENT_DATE | CURRENT_TIME |
CURRENT_TIMESTAMP | CURRENT_USER | CURSOR | DATABASE | DBCC |
DEALLOCATE | DECLARE | DEFAULT | DELETE | DENY |
DESC | DISK | DISTINCT | DISTRIBUTED | DOUBLE |
DROP | DUMMY | DUMP | ELSE | END |
ERRLVL | ERROREXIT | ESCAPE | EXCEPT | EXEC |
EXECUTE | EXISTS | EXIT | FETCH | FILE |
FILLFACTOR | FLOPPY | FOR | FOREIGN | FREETEXT |
FREETEXTTABLE | FROM | FULL | GOTO | GRANT |
GROUP | HAVING | HOLDLOCK | IDENTITY | IDENTITY_INSERT |
IDENTITYCOL | IF | IN | INDEX | INNER |
INSERT | INTERSECT | INTO | IS | ISOLATION |
JOIN | KEY | KILL | LEFT | LEVEL |
LIKE | LINENO | LOAD | MAX | MIN |
MIRROREXIT | NATIONAL | NOCHECK | NONCLUSTERED | NOT |
NULL | NULLIF | OF | OFF | OFFSETS |
ON | ONCE | ONLY | OPEN | OPENDATASOURCE |
OPENQUERY | OPENROWSET | OPTION | OR | ORDER |
OUTER | OVER | PERCENT | PERM | PERMANENT |
PIPE | PLAN | PRECISION | PREPARE | PRIMARY |
PRIVILEGES | PROC | PROCEDURE | PROCESSEXIT | |
PUBLIC | RAISERROR | READ | READTEXT | RECONFIGURE |
REFERENCES | REPEATABLE | REPLICATION | RESTORE | RESTRICT |
RETURN | REVOKE | RIGHT | ROLLBACK | ROWCOUNT |
ROWGUIDCOL | RULE | SAVE | SCHEMA | SELECT |
SERIALIZABLE | SESSION_USER | SET | SETUSER | SHUTDOWN |
SOME | STATISTICS | SUM | SYSTEM_USER | TABLE |
TAPE | TEMP | TEMPORARY | TEXTSIZE | THEN |
TO | TOP | TRAN | TRANSACTION | TRIGGER |
TRUNCATE | TSEQUAL | UNCOMMITTED | UNION | UNIQUE |
UPDATE | UPDATETEXT | USE | USER | VALUES |
VARYING | VIEW | WAITFOR | WHEN | WHERE |
WHILE | WITH | WORK | WRITETEXT |
0 Kommentarer