Reserved Words in Apollo SQL

<< Click to Display Table of Contents >>

Navigation:  Apollo SQL > Using Apollo SQL >

Reserved Words in Apollo SQL

Below is an alphabetical list of words reserved by Apollo SQL. Avoid using these reserved words for the names of tables or columns or columns alias. If you must use a reserved word as a column name within a SELECT statement, you can surround the reserved word in brackets "[ ]" to identify it as not to be evaluated as a keyword.

For example, using a field called DATE, which is a reserved word, you could do this:

Example 1

SELECT [date] FROM test

Example 2

 

SELECT a.first AS [First Name],  

a.last AS [Last Name],  

a.[date] AS [Date]

FROM test a  

WHERE (a.[date] >= '01/31/2015')

ORDER BY a.[date] DESC

image\tip.gif In the case of a table that contains a field with a name that is a reserved word, issuing a SELECT * is not a problem, since the field name itself is not included in the SELECT statement.

ALL

ALTER

AND

ANY

APPEND

AS

ASC

AUTOINC

AVG

BETWEEN

BLOB

BOOLEAN

BOTH

BY

CAST

CHAR

COPY

COUNT

CREATE

DATE

DATETIME

DAY

DELETE

DESC

DISTINCT

DIV

DROP

ESCAPE

EXTRACT

FALSE

FLOAT

FOR

FROM

FULL

GROUP

HAVING

HOUR

IN

INDEX

INNER

INSERT

INTEGER

INTO

JOIN

KEY

LEADING

LEFT

LIKE

MAX

MERGE

MIN

MOD

MONEY

MONTH

MSEC

NOT

NOW

NUMERIC

ON

OR

ORDER

OUTER

PIVOT

PRIMARY

RIGHT

ROUNDDEC

SEC

SELECT

SET

SHL

SHR

SMALLINT

STDEV

SUBSTRING

SUM

TABLE

TIME

TO

TRAILING

TRANSFORM

TRIM

TRUE

TRUNCDEC

UNIQUE

UPDATE

VALUES

WHERE

YEAR