Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

FairCom DB SQL Reserved Words

Frequently, an application developer chooses a logically apt column name, however, this name happens to collide with a FairCom DB SQL reserved word. Surrounding identifiers in double quotes ensures they are properly interpreted as a table name, column name, or other identifier.

Example

CREATE TABLE "version" ("character" VARCHAR(10), "hour" VARCHAR(10));

INSERT INTO "version" VALUES ("Cinderella", "midnight");

SELECT "character", "hour" FROM "version";

To ensure your application is always prepared for future versions of FairCom DB SQL it could be considered prudent to always quote identifiers, thus avoiding issues with future reserved words.

A complete list of Reserved Words follows.

A

a, abs, acos, add, add_months, after, all, alter, an, and, any, array, as, ascii, asin, atan, atan2, avg

B

before, begin, between, bigint, binary, bind, binding, bit, blob, both, by

C

call, cascade, case, cast, ceiling, char, char_length, character, character_length, chartorowid, check, chr, cleanup, , close, clustered, coalesce, colgroup, collate, column, commit, complex, compress, concat, connect, constraint, contains, continue, convert, cos, cot, count, create, cross, curdate, current, current_date, current_user, cursor, curtime, current_time, current_timestamp, cvar

D

database, datapages, date, dateadd, datediff, dayname, dayofmonth, dayofweek, dayofyear, db_name, dba, dec, decimal, declaration, declare, decode, default, definition, degrees, delete, desc, describe, descriptor, dhtype, difference, distinct, double, drop

E

each, else, end, escape, exclusive, exec, execute, exists, exit, exp, explain, explicit, extract

F

fetch, field, file, float, floor, for, foreign, found, from, full, function

G

go, goto, grant, greatest, group

H

hash, having, hour

I

identified, identity, ifnull, immediate, in, index, indexpages, indicator, initcap, inner, inout, input, insert, instr, int, integer, interface, intersect, into, is, isnull

J

join

K

key

L

large, last_day, lcase, least, leading, left, length, like, link, list, localtime, localtimestamp, locate, lock, log, log10, long, lower, lpad, ltrim, lvarbinary, lvarchar

M

main, max, metadata_only, min, minus, minute, mod, mode, modify, money, month, monthname, months_between

N

national, natural, nchar, nclob, newrow, next_day, nocompress, not, now, nowait, null, nullif, nullvalue, number, numeric, nlvarchar, nvl nvarchar

O

object, object_id, odbc_convert, odbcinfo, of, oldrow, on, open, option, or, order, out, outer, output

P

pctfree, percent, pi, placing, plan, position, power, precision, prefix, prepare, primary, privileges, procedure, public

Q

quarter

R

radians, rand, range, raw, real, record, recursive, references, referencing, rename, repeat, replace, resource, restrict, result, return, returns, revoke, right, rollback, row, rowid, rowidtochar, rownum, rpad, rtrim

S

schema, searched_case, second, section, select, service, set, session_user, share, short, sign, simple_case, sin, size, smallint, some, soundex, space, sql, sql_bigint, sql_binary, sql_bit, sql_char, sql_date, sql_decimal, sql_double, sql_float, sql_integer, sql_longvarbinary, sql_longvarchar, sql_numeric, sql_real, sql_smallint, sql_time, sql_timestamp, sql_tinyint, sql_tsi_day, sql_tsi_frac_second, sql_tsi_hour, sql_tsi_minute, sql_tsi_month, sql_tsi_quarter, sql_tsi_second, sql_tst_week, sql_tsi_year, sql_varbinary, sql_varchar, sqlerror, sqlwarning, sort, start, statement, statement_id, statistics, storage_attributes, storage_manager, substr, substring, suffix, sum, synonym, sysdate, systime, systimestamp

T

table, tan, then, ties, time, timeout, timestamp, timestampadd, timestampdiff, tinyint, to, top, to_char, to_date, to_number, to_time, to_timestamp, tpe, trailing, transaction, translate, trigger, trim, truncate, type

U

ucase, uid, union, unique, unsigned, update, upper, user, user_id, user_name, using, uuid

V

values, varbinary, varchar, variables, varying, version, view

W

week, when, whenever, where, with, work

Y

year

TOCIndex