VistaDB 5
Gibraltar VistaDB > Developer's Guide > SQL Reference > SQL Reference - Reserved Keywords
SQL Reference - Reserved Keywords

The following are keywords for VistaDB. These are not recommended to be used as column or table names. You may still use them by surrounding them with []'s, but it is generally easier to just avoid their usage entirely.

Certain keywords are required to be bracketed for usage.

Examples:

key
statistics
user

The error stack reads like this:

Error 592: Invalid token in statement: select
Error 509: Invalid statement: select
Error 617: Name or alias cannot be reserved word: user

Note that the inner error tells you the exact keyword with the problem. This should help in diagnosing the problem.

Keywords can be used as identifiers or names of database objects, such as columns, tables, views, alias names, etc, but must be quoted or delimited.

Reserved keywords may be used if they are delimited with square brackets ([]) or double quotes (").

select [user] from tablename;

select "user" from tablename;

If you have a column name that is also a function name (like STR or TRIM) you should also bracket the column.

In addition the SQL-2003 specification has a different set of reserved keywords. SQL Server is sometimes less restructive than the standard allowing words like INT since it does not support this as a datatype. Care should be taken when using these keywords as SQL Server may change this in the future.


ADD
ALL
ALTER
AND
ANY
AS
ASC
AUTHORIZATION
BACKUP
BEGIN
BETWEEN
BREAK
BROWSE
BULK
BY
CASCADE
CASE
CHECK
CHECKPOINT
CLOSE
CLUSTERED
COALESCE
COLLATE
COLUMN
COMMIT
COMPUTE
CONSTRAINT
CONTAINS
CONTAINSTABLE
CONTINUE
CONVERT
CREATE
CROSS
CURRENT
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_USER
CURSOR
DATABASE
DATETIME2
DATETIMEOFFSET
DBCC
DEALLOCATE
DECLARE
DEFAULT
DELETE
DENY
DESC
DISK
DISTINCT
DISTRIBUTED
DOUBLE
DROP
DUMP
ELSE
END
ERRLVL
ESCAPE
EXCEPT
EXEC
EXECUTE
EXISTS
EXIT
EXTERNAL
FETCH
FILE
FILLFACTOR
FOR
FOREIGN
FREETEXT
FREETEXTTABLE
FROM
FULL
FUNCTION
GOTO
GRANT
GROUP
HAVING
HOLDLOCK
IDENT_SEED
IDENT_CURRENT
IDENTITY
IDENTITY_INSERT
IDENTITYCOL
IF
IMAGE
IN
INDEX
INNER
INSERT
INTERSECT
INTO
IS
ISDATE
ISNULL
ISNUMERIC
JOIN
KEY
KILL
LEFT
LIKE
LINENO
LOAD
NATIONAL
NEWSEQUENTIALID
NOCHECK
NONCLUSTERED
NOT
NULL
NULLIF
OBJECT_DEFINITION
OBJECT_ID
OBJECT_NAME
OBJECT_SCHEMA_NAME
OBJECTPROPERTY
OBJECTPROPERTYEX
OF
OFF
OFFSETS
ON
OPEN
OPENDATASOURCE
OPENQUERY
OPENROWSET
OPENXML
OPTION
OR
ORDER
OUTER
OVER
PERCENT
PIVOT
PLAN
PRECISION
PRIMARY
PRINT
PROC
PROCEDURE
PUBLIC
RAISERROR
READ
READTEXT
RECONFIGURE
REFERENCES
REPLICATION
RESTORE
RESTRICT
RETURN
REVERT
REVERSE
REVOKE
RIGHT
ROLLBACK
ROUND
ROWCOUNT
ROWGUIDCOL
ROWVERSION
RULE
SAVE
SCHEMA
SCHEMA_ID
SCHEMA_NAME
SCOPE_IDENTITY
SECURITYAUDIT
SELECT
SESSION_USER
SET
SETUSER
SHUTDOWN
SIGN
SIN
SKIP
SMALLDATETIME
SOME
STATISTICS
SYSTEM_USER
SQL_VARIANT
SWITCHOFFSET
TABLE
TABLESAMPLE
TEXTSIZE
TIES
TIME
TIMESTAMP
TIMEZONE
THEN
TO
TODATETIMEOFFSET
TOP
TRAN
TRANCOUNT
TRANSACTION
TRIGGER
TRUNCATE
TSEQUAL
UNION
UNIQUE
UNIQUEIDENTIFIER
UNPIVOT
UPDATE
UPDATETEXT
USE
USER
VALUES
VARYING
VIEW
WAITFOR
WHEN
WHERE
WHILE
WITH
WRITETEXT
XML
XML_SCHEMA_NAMESPACE
YEAR


Remarks

We have attempted to follow the Microsoft SQL Server keyword list as closely as possible.

See also the Reserved Keywords list for Transact-SQL

See Also