附录 C. SQL关键词

表 C.1列出了在SQL标准以及PostgreSQL 14.1中作为关键词的所有记号。背景资料可以在第 4.1.1 节中找到(由于篇幅的缘故,只包括了SQL标准的最近两个版本以及用于与历史比较的SQL-92。这些版本以及其他中间标准的版本之间的差别很小)。

SQL区分保留关键词和非保留关键词。根据标准,保留关键词才是真正的关键词,它们绝不会被允许作为标识符。非关键词仅仅是在特定上下文中具有特殊的含义并且可以在其他上下文中被用作标识符。大部分非保留关键词实际上是SQL指定的内建表和内建函数的名字。非保留关键词的概念存在的意义上实际上是声明某些上下文中的一个词被附加了某种预定义的含义。

PostgreSQL的解析器中,情况更加复杂。其中有多种不同的记号分类,从那些决不能被用作标识符的记号到那些在解析器中绝对没有特殊状态,但被认为是普通的标识符。(后者通常是SQL中指定的函数)。在PostgreSQL中甚至保留关键词也不是完全被保留的,而是可以被用作列标签(例如可以写SELECT 55 AS CHECK,虽然CHECK是一个保留关键词)。

表 C.1PostgreSQL列中,我们把解析器明确知道但允许作为列名或者表名的那些关键词分类为非保留。有一些关键词是非保留的,但是不能被用作函数或数据类型名称,因此它们会被标记(大部分这些词表示有特殊语法的内建函数或数据类型。这种函数或类型仍然可用,但是不能被用户重新定义)。不允许作为列名或表名的记号被打上保留的标签。某些保留关键词被允许作为函数或数据类型的名字,这也显示在该表中。如果没有被那样标记,保留关键词仅被允许作为列标签。 这一列的空白项意味着这个词被PostgreSQL当作一个普通的标识符。

此外,虽然大多数关键词可以用作bare列标签,而不用在它们前面写AS(如第 7.3.2 节中描述的那样),但有一些需要在前面加上AS以避免歧义。 这些在表中被标记为requires AS

一般来说,如果你在使用任何所列出关键词作为标识符的命令,遇到虚假的解析器错误,应该尝试将该标识符加上引号来看看是否能解决问题。

在学习表 C.1之前有一件重要的事情是理解一个在PostgreSQL中不被保留的关键字并不意味着与该词相关的特性没有被实现。反过来,一个关键词的存在也不表示相应特性的存在。

表 C.1. SQL Key Words

Key WordPostgreSQLSQL:2016SQL:2011SQL-92
A non-reservednon-reserved 
ABORTnon-reserved   
ABS reservedreserved 
ABSENT non-reservednon-reserved 
ABSOLUTEnon-reservednon-reservednon-reservedreserved
ACCESSnon-reserved   
ACCORDING non-reservednon-reserved 
ACOS reserved  
ACTIONnon-reservednon-reservednon-reservedreserved
ADA non-reservednon-reservednon-reserved
ADDnon-reservednon-reservednon-reservedreserved
ADMINnon-reservednon-reservednon-reserved 
AFTERnon-reservednon-reservednon-reserved 
AGGREGATEnon-reserved   
ALLreservedreservedreservedreserved
ALLOCATE reservedreservedreserved
ALSOnon-reserved   
ALTERnon-reservedreservedreservedreserved
ALWAYSnon-reservednon-reservednon-reserved 
ANALYSEreserved   
ANALYZEreserved   
ANDreservedreservedreservedreserved
ANYreservedreservedreservedreserved
ARE reservedreservedreserved
ARRAYreserved, requires ASreservedreserved 
ARRAY_AGG reservedreserved 
ARRAY_​MAX_​CARDINALITY reservedreserved 
ASreserved, requires ASreservedreservedreserved
ASCreservednon-reservednon-reservedreserved
ASENSITIVEnon-reservedreservedreserved 
ASIN reserved  
ASSERTIONnon-reservednon-reservednon-reservedreserved
ASSIGNMENTnon-reservednon-reservednon-reserved 
ASYMMETRICreservedreservedreserved 
ATnon-reservedreservedreservedreserved
ATAN reserved  
ATOMICnon-reservedreservedreserved 
ATTACHnon-reserved   
ATTRIBUTEnon-reservednon-reservednon-reserved 
ATTRIBUTES non-reservednon-reserved 
AUTHORIZATIONreserved (can be function or type)reservedreservedreserved
AVG reservedreservedreserved
BACKWARDnon-reserved   
BASE64 non-reservednon-reserved 
BEFOREnon-reservednon-reservednon-reserved 
BEGINnon-reservedreservedreservedreserved
BEGIN_FRAME reservedreserved 
BEGIN_PARTITION reservedreserved 
BERNOULLI non-reservednon-reserved 
BETWEENnon-reserved (cannot be function or type)reservedreservedreserved
BIGINTnon-reserved (cannot be function or type)reservedreserved 
BINARYreserved (can be function or type)reservedreserved 
BITnon-reserved (cannot be function or type)  reserved
BIT_LENGTH   reserved
BLOB reservedreserved 
BLOCKED non-reservednon-reserved 
BOM non-reservednon-reserved 
BOOLEANnon-reserved (cannot be function or type)reservedreserved 
BOTHreservedreservedreservedreserved
BREADTHnon-reservednon-reservednon-reserved 
BYnon-reservedreservedreservedreserved
C non-reservednon-reservednon-reserved
CACHEnon-reserved   
CALLnon-reservedreservedreserved 
CALLEDnon-reservedreservedreserved 
CARDINALITY reservedreserved 
CASCADEnon-reservednon-reservednon-reservedreserved
CASCADEDnon-reservedreservedreservedreserved
CASEreservedreservedreservedreserved
CASTreservedreservedreservedreserved
CATALOGnon-reservednon-reservednon-reservedreserved
CATALOG_NAME non-reservednon-reservednon-reserved
CEIL reservedreserved 
CEILING reservedreserved 
CHAINnon-reservednon-reservednon-reserved 
CHAINING non-reserved  
CHARnon-reserved (cannot be function or type), requires ASreservedreservedreserved
CHARACTERnon-reserved (cannot be function or type), requires ASreservedreservedreserved
CHARACTERISTICSnon-reservednon-reservednon-reserved 
CHARACTERS non-reservednon-reserved 
CHARACTER_LENGTH reservedreservedreserved
CHARACTER_​SET_​CATALOG non-reservednon-reservednon-reserved
CHARACTER_SET_NAME non-reservednon-reservednon-reserved
CHARACTER_SET_SCHEMA non-reservednon-reservednon-reserved
CHAR_LENGTH reservedreservedreserved
CHECKreservedreservedreservedreserved
CHECKPOINTnon-reserved   
CLASSnon-reserved   
CLASSIFIER reserved  
CLASS_ORIGIN non-reservednon-reservednon-reserved
CLOB reservedreserved 
CLOSEnon-reservedreservedreservedreserved
CLUSTERnon-reserved   
COALESCEnon-reserved (cannot be function or type)reservedreservedreserved
COBOL non-reservednon-reservednon-reserved
COLLATEreservedreservedreservedreserved
COLLATIONreserved (can be function or type)non-reservednon-reservedreserved
COLLATION_CATALOG non-reservednon-reservednon-reserved
COLLATION_NAME non-reservednon-reservednon-reserved
COLLATION_SCHEMA non-reservednon-reservednon-reserved
COLLECT reservedreserved 
COLUMNreservedreservedreservedreserved
COLUMNSnon-reservednon-reservednon-reserved 
COLUMN_NAME non-reservednon-reservednon-reserved
COMMAND_FUNCTION non-reservednon-reservednon-reserved
COMMAND_​FUNCTION_​CODE non-reservednon-reserved 
COMMENTnon-reserved   
COMMENTSnon-reserved   
COMMITnon-reservedreservedreservedreserved
COMMITTEDnon-reservednon-reservednon-reservednon-reserved
COMPRESSIONnon-reserved   
CONCURRENTLYreserved (can be function or type)   
CONDITION reservedreserved 
CONDITIONAL non-reserved  
CONDITION_NUMBER non-reservednon-reservednon-reserved
CONFIGURATIONnon-reserved   
CONFLICTnon-reserved   
CONNECT reservedreservedreserved
CONNECTIONnon-reservednon-reservednon-reservedreserved
CONNECTION_NAME non-reservednon-reservednon-reserved
CONSTRAINTreservedreservedreservedreserved
CONSTRAINTSnon-reservednon-reservednon-reservedreserved
CONSTRAINT_CATALOG non-reservednon-reservednon-reserved
CONSTRAINT_NAME non-reservednon-reservednon-reserved
CONSTRAINT_SCHEMA non-reservednon-reservednon-reserved
CONSTRUCTOR non-reservednon-reserved 
CONTAINS reservedreserved 
CONTENTnon-reservednon-reservednon-reserved 
CONTINUEnon-reservednon-reservednon-reservedreserved
CONTROL non-reservednon-reserved 
CONVERSIONnon-reserved   
CONVERT reservedreservedreserved
COPYnon-reservedreserved  
CORR reservedreserved 
CORRESPONDING reservedreservedreserved
COS reserved  
COSH reserved  
COSTnon-reserved   
COUNT reservedreservedreserved
COVAR_POP reservedreserved 
COVAR_SAMP reservedreserved 
CREATEreserved, requires ASreservedreservedreserved
CROSSreserved (can be function or type)reservedreservedreserved
CSVnon-reserved   
CUBEnon-reservedreservedreserved 
CUME_DIST reservedreserved 
CURRENTnon-reservedreservedreservedreserved
CURRENT_CATALOGreservedreservedreserved 
CURRENT_DATEreservedreservedreservedreserved
CURRENT_​DEFAULT_​TRANSFORM_​GROUP reservedreserved 
CURRENT_PATH reservedreserved 
CURRENT_ROLEreservedreservedreserved 
CURRENT_ROW reservedreserved 
CURRENT_SCHEMAreserved (can be function or type)reservedreserved 
CURRENT_TIMEreservedreservedreservedreserved
CURRENT_TIMESTAMPreservedreservedreservedreserved
CURRENT_​TRANSFORM_​GROUP_​FOR_​TYPE reservedreserved 
CURRENT_USERreservedreservedreservedreserved
CURSORnon-reservedreservedreservedreserved
CURSOR_NAME non-reservednon-reservednon-reserved
CYCLEnon-reservedreservedreserved 
DATAnon-reservednon-reservednon-reservednon-reserved
DATABASEnon-reserved   
DATALINK reservedreserved 
DATE reservedreservedreserved
DATETIME_​INTERVAL_​CODE non-reservednon-reservednon-reserved
DATETIME_​INTERVAL_​PRECISION non-reservednon-reservednon-reserved
DAYnon-reserved, requires ASreservedreservedreserved
DB non-reservednon-reserved 
DEALLOCATEnon-reservedreservedreservedreserved
DECnon-reserved (cannot be function or type)reservedreservedreserved
DECFLOAT reserved  
DECIMALnon-reserved (cannot be function or type)reservedreservedreserved
DECLAREnon-reservedreservedreservedreserved
DEFAULTreservedreservedreservedreserved
DEFAULTSnon-reservednon-reservednon-reserved 
DEFERRABLEreservednon-reservednon-reservedreserved
DEFERREDnon-reservednon-reservednon-reservedreserved
DEFINE reserved  
DEFINED non-reservednon-reserved 
DEFINERnon-reservednon-reservednon-reserved 
DEGREE non-reservednon-reserved 
DELETEnon-reservedreservedreservedreserved
DELIMITERnon-reserved   
DELIMITERSnon-reserved   
DENSE_RANK reservedreserved 
DEPENDSnon-reserved   
DEPTHnon-reservednon-reservednon-reserved 
DEREF reservedreserved 
DERIVED non-reservednon-reserved 
DESCreservednon-reservednon-reservedreserved
DESCRIBE reservedreservedreserved
DESCRIPTOR non-reservednon-reservedreserved
DETACHnon-reserved   
DETERMINISTIC reservedreserved 
DIAGNOSTICS non-reservednon-reservedreserved
DICTIONARYnon-reserved   
DISABLEnon-reserved   
DISCARDnon-reserved   
DISCONNECT reservedreservedreserved
DISPATCH non-reservednon-reserved 
DISTINCTreservedreservedreservedreserved
DLNEWCOPY reservedreserved 
DLPREVIOUSCOPY reservedreserved 
DLURLCOMPLETE reservedreserved 
DLURLCOMPLETEONLY reservedreserved 
DLURLCOMPLETEWRITE reservedreserved 
DLURLPATH reservedreserved 
DLURLPATHONLY reservedreserved 
DLURLPATHWRITE reservedreserved 
DLURLSCHEME reservedreserved 
DLURLSERVER reservedreserved 
DLVALUE reservedreserved 
DOreserved   
DOCUMENTnon-reservednon-reservednon-reserved 
DOMAINnon-reservednon-reservednon-reservedreserved
DOUBLEnon-reservedreservedreservedreserved
DROPnon-reservedreservedreservedreserved
DYNAMIC reservedreserved 
DYNAMIC_FUNCTION non-reservednon-reservednon-reserved
DYNAMIC_​FUNCTION_​CODE non-reservednon-reserved 
EACHnon-reservedreservedreserved 
ELEMENT reservedreserved 
ELSEreservedreservedreservedreserved
EMPTY reservednon-reserved 
ENABLEnon-reserved   
ENCODINGnon-reservednon-reservednon-reserved 
ENCRYPTEDnon-reserved   
ENDreservedreservedreservedreserved
END-EXEC reservedreservedreserved
END_FRAME reservedreserved 
END_PARTITION reservedreserved 
ENFORCED non-reservednon-reserved 
ENUMnon-reserved   
EQUALS reservedreserved 
ERROR non-reserved  
ESCAPEnon-reservedreservedreservedreserved
EVENTnon-reserved   
EVERY reservedreserved 
EXCEPTreserved, requires ASreservedreservedreserved
EXCEPTION   reserved
EXCLUDEnon-reservednon-reservednon-reserved 
EXCLUDINGnon-reservednon-reservednon-reserved 
EXCLUSIVEnon-reserved   
EXEC reservedreservedreserved
EXECUTEnon-reservedreservedreservedreserved
EXISTSnon-reserved (cannot be function or type)reservedreservedreserved
EXP reservedreserved 
EXPLAINnon-reserved   
EXPRESSIONnon-reservednon-reservednon-reserved 
EXTENSIONnon-reserved   
EXTERNALnon-reservedreservedreservedreserved
EXTRACTnon-reserved (cannot be function or type)reservedreservedreserved
FALSEreservedreservedreservedreserved
FAMILYnon-reserved   
FETCHreserved, requires ASreservedreservedreserved
FILE non-reservednon-reserved 
FILTERnon-reserved, requires ASreservedreserved 
FINAL non-reservednon-reserved 
FINALIZEnon-reserved   
FINISH non-reserved  
FIRSTnon-reservednon-reservednon-reservedreserved
FIRST_VALUE reservedreserved 
FLAG non-reservednon-reserved 
FLOATnon-reserved (cannot be function or type)reservedreservedreserved
FLOOR reservedreserved 
FOLLOWINGnon-reservednon-reservednon-reserved 
FORreserved, requires ASreservedreservedreserved
FORCEnon-reserved   
FOREIGNreservedreservedreservedreserved
FORMAT non-reserved  
FORTRAN non-reservednon-reservednon-reserved
FORWARDnon-reserved   
FOUND non-reservednon-reservedreserved
FRAME_ROW reservedreserved 
FREE reservedreserved 
FREEZEreserved (can be function or type)   
FROMreserved, requires ASreservedreservedreserved
FS non-reservednon-reserved 
FULFILL non-reserved  
FULLreserved (can be function or type)reservedreservedreserved
FUNCTIONnon-reservedreservedreserved 
FUNCTIONSnon-reserved   
FUSION reservedreserved 
G non-reservednon-reserved 
GENERAL non-reservednon-reserved 
GENERATEDnon-reservednon-reservednon-reserved 
GET reservedreservedreserved
GLOBALnon-reservedreservedreservedreserved
GO non-reservednon-reservedreserved
GOTO non-reservednon-reservedreserved
GRANTreserved, requires ASreservedreservedreserved
GRANTEDnon-reservednon-reservednon-reserved 
GREATESTnon-reserved (cannot be function or type)   
GROUPreserved, requires ASreservedreservedreserved
GROUPINGnon-reserved (cannot be function or type)reservedreserved 
GROUPSnon-reservedreservedreserved 
HANDLERnon-reserved   
HAVINGreserved, requires ASreservedreservedreserved
HEADERnon-reserved   
HEX non-reservednon-reserved 
HIERARCHY non-reservednon-reserved 
HOLDnon-reservedreservedreserved 
HOURnon-reserved, requires ASreservedreservedreserved
ID non-reservednon-reserved 
IDENTITYnon-reservedreservedreservedreserved
IFnon-reserved   
IGNORE non-reservednon-reserved 
ILIKEreserved (can be function or type)   
IMMEDIATEnon-reservednon-reservednon-reservedreserved
IMMEDIATELY non-reservednon-reserved 
IMMUTABLEnon-reserved   
IMPLEMENTATION non-reservednon-reserved 
IMPLICITnon-reserved   
IMPORTnon-reservedreservedreserved 
INreservedreservedreservedreserved
INCLUDEnon-reserved   
INCLUDINGnon-reservednon-reservednon-reserved 
INCREMENTnon-reservednon-reservednon-reserved 
INDENT non-reservednon-reserved 
INDEXnon-reserved   
INDEXESnon-reserved   
INDICATOR reservedreservedreserved
INHERITnon-reserved   
INHERITSnon-reserved   
INITIAL reserved  
INITIALLYreservednon-reservednon-reservedreserved
INLINEnon-reserved   
INNERreserved (can be function or type)reservedreservedreserved
INOUTnon-reserved (cannot be function or type)reservedreserved 
INPUTnon-reservednon-reservednon-reservedreserved
INSENSITIVEnon-reservedreservedreservedreserved
INSERTnon-reservedreservedreservedreserved
INSTANCE non-reservednon-reserved 
INSTANTIABLE non-reservednon-reserved 
INSTEADnon-reservednon-reservednon-reserved 
INTnon-reserved (cannot be function or type)reservedreservedreserved
INTEGERnon-reserved (cannot be function or type)reservedreservedreserved
INTEGRITY non-reservednon-reserved 
INTERSECTreserved, requires ASreservedreservedreserved
INTERSECTION reservedreserved 
INTERVALnon-reserved (cannot be function or type)reservedreservedreserved
INTOreserved, requires ASreservedreservedreserved
INVOKERnon-reservednon-reservednon-reserved 
ISreserved (can be function or type)reservedreservedreserved
ISNULLreserved (can be function or type), requires AS   
ISOLATIONnon-reservednon-reservednon-reservedreserved
JOINreserved (can be function or type)reservedreservedreserved
JSON non-reserved  
JSON_ARRAY reserved  
JSON_ARRAYAGG reserved  
JSON_EXISTS reserved  
JSON_OBJECT reserved  
JSON_OBJECTAGG reserved  
JSON_QUERY reserved  
JSON_TABLE reserved  
JSON_TABLE_PRIMITIVE reserved  
JSON_VALUE reserved  
K non-reservednon-reserved 
KEEP non-reserved  
KEYnon-reservednon-reservednon-reservedreserved
KEYS non-reserved  
KEY_MEMBER non-reservednon-reserved 
KEY_TYPE non-reservednon-reserved 
LABELnon-reserved   
LAG reservedreserved 
LANGUAGEnon-reservedreservedreservedreserved
LARGEnon-reservedreservedreserved 
LASTnon-reservednon-reservednon-reservedreserved
LAST_VALUE reservedreserved 
LATERALreservedreservedreserved 
LEAD reservedreserved 
LEADINGreservedreservedreservedreserved
LEAKPROOFnon-reserved   
LEASTnon-reserved (cannot be function or type)   
LEFTreserved (can be function or type)reservedreservedreserved
LENGTH non-reservednon-reservednon-reserved
LEVELnon-reservednon-reservednon-reservedreserved
LIBRARY non-reservednon-reserved 
LIKEreserved (can be function or type)reservedreservedreserved
LIKE_REGEX reservedreserved 
LIMITreserved, requires ASnon-reservednon-reserved 
LINK non-reservednon-reserved 
LISTAGG reserved  
LISTENnon-reserved   
LN reservedreserved 
LOADnon-reserved   
LOCALnon-reservedreservedreservedreserved
LOCALTIMEreservedreservedreserved 
LOCALTIMESTAMPreservedreservedreserved 
LOCATIONnon-reservednon-reservednon-reserved 
LOCATOR non-reservednon-reserved 
LOCKnon-reserved   
LOCKEDnon-reserved   
LOG reserved  
LOG10 reserved  
LOGGEDnon-reserved   
LOWER reservedreservedreserved
M non-reservednon-reserved 
MAP non-reservednon-reserved 
MAPPINGnon-reservednon-reservednon-reserved 
MATCHnon-reservedreservedreservedreserved
MATCHED non-reservednon-reserved 
MATCHES reserved  
MATCH_NUMBER reserved  
MATCH_RECOGNIZE reserved  
MATERIALIZEDnon-reserved   
MAX reservedreservedreserved
MAXVALUEnon-reservednon-reservednon-reserved 
MEASURES reserved  
MEMBER reservedreserved 
MERGE reservedreserved 
MESSAGE_LENGTH non-reservednon-reservednon-reserved
MESSAGE_OCTET_LENGTH non-reservednon-reservednon-reserved
MESSAGE_TEXT non-reservednon-reservednon-reserved
METHODnon-reservedreservedreserved 
MIN reservedreservedreserved
MINUTEnon-reserved, requires ASreservedreservedreserved
MINVALUEnon-reservednon-reservednon-reserved 
MOD reservedreserved 
MODEnon-reserved   
MODIFIES reservedreserved 
MODULE reservedreservedreserved
MONTHnon-reserved, requires ASreservedreservedreserved
MORE non-reservednon-reservednon-reserved
MOVEnon-reserved   
MULTISET reservedreserved 
MUMPS non-reservednon-reservednon-reserved
NAMEnon-reservednon-reservednon-reservednon-reserved
NAMESnon-reservednon-reservednon-reservedreserved
NAMESPACE non-reservednon-reserved 
NATIONALnon-reserved (cannot be function or type)reservedreservedreserved
NATURALreserved (can be function or type)reservedreservedreserved
NCHARnon-reserved (cannot be function or type)reservedreservedreserved
NCLOB reservedreserved 
NESTED non-reserved  
NESTING non-reservednon-reserved 
NEWnon-reservedreservedreserved 
NEXTnon-reservednon-reservednon-reservedreserved
NFCnon-reservednon-reservednon-reserved 
NFDnon-reservednon-reservednon-reserved 
NFKCnon-reservednon-reservednon-reserved 
NFKDnon-reservednon-reservednon-reserved 
NIL non-reservednon-reserved 
NOnon-reservedreservedreservedreserved
NONEnon-reserved (cannot be function or type)reservedreserved 
NORMALIZEnon-reserved (cannot be function or type)reservedreserved 
NORMALIZEDnon-reservednon-reservednon-reserved 
NOTreservedreservedreservedreserved
NOTHINGnon-reserved   
NOTIFYnon-reserved   
NOTNULLreserved (can be function or type), requires AS   
NOWAITnon-reserved   
NTH_VALUE reservedreserved 
NTILE reservedreserved 
NULLreservedreservedreservedreserved
NULLABLE non-reservednon-reservednon-reserved
NULLIFnon-reserved (cannot be function or type)reservedreservedreserved
NULLSnon-reservednon-reservednon-reserved 
NUMBER non-reservednon-reservednon-reserved
NUMERICnon-reserved (cannot be function or type)reservedreservedreserved
OBJECTnon-reservednon-reservednon-reserved 
OCCURRENCES_REGEX reservedreserved 
OCTETS non-reservednon-reserved 
OCTET_LENGTH reservedreservedreserved
OFnon-reservedreservedreservedreserved
OFFnon-reservednon-reservednon-reserved 
OFFSETreserved, requires ASreservedreserved 
OIDSnon-reserved   
OLDnon-reservedreservedreserved 
OMIT reserved  
ONreserved, requires ASreservedreservedreserved
ONE reserved  
ONLYreservedreservedreservedreserved
OPEN reservedreservedreserved
OPERATORnon-reserved   
OPTIONnon-reservednon-reservednon-reservedreserved
OPTIONSnon-reservednon-reservednon-reserved 
ORreservedreservedreservedreserved
ORDERreserved, requires ASreservedreservedreserved
ORDERING non-reservednon-reserved 
ORDINALITYnon-reservednon-reservednon-reserved 
OTHERSnon-reservednon-reservednon-reserved 
OUTnon-reserved (cannot be function or type)reservedreserved 
OUTERreserved (can be function or type)reservedreservedreserved
OUTPUT non-reservednon-reservedreserved
OVERnon-reserved, requires ASreservedreserved 
OVERFLOW non-reserved  
OVERLAPSreserved (can be function or type), requires ASreservedreservedreserved
OVERLAYnon-reserved (cannot be function or type)reservedreserved 
OVERRIDINGnon-reservednon-reservednon-reserved 
OWNEDnon-reserved   
OWNERnon-reserved   
P non-reservednon-reserved 
PAD non-reservednon-reservedreserved
PARALLELnon-reserved   
PARAMETER reservedreserved 
PARAMETER_MODE non-reservednon-reserved 
PARAMETER_NAME non-reservednon-reserved 
PARAMETER_​ORDINAL_​POSITION non-reservednon-reserved 
PARAMETER_​SPECIFIC_​CATALOG non-reservednon-reserved 
PARAMETER_​SPECIFIC_​NAME non-reservednon-reserved 
PARAMETER_​SPECIFIC_​SCHEMA non-reservednon-reserved 
PARSERnon-reserved   
PARTIALnon-reservednon-reservednon-reservedreserved
PARTITIONnon-reservedreservedreserved 
PASCAL non-reservednon-reservednon-reserved
PASS non-reserved  
PASSINGnon-reservednon-reservednon-reserved 
PASSTHROUGH non-reservednon-reserved 
PASSWORDnon-reserved   
PAST non-reserved  
PATH non-reservednon-reserved 
PATTERN reserved  
PER reserved  
PERCENT reservedreserved 
PERCENTILE_CONT reservedreserved 
PERCENTILE_DISC reservedreserved 
PERCENT_RANK reservedreserved 
PERIOD reservedreserved 
PERMISSION non-reservednon-reserved 
PERMUTE reserved  
PLACINGreservednon-reservednon-reserved 
PLAN non-reserved  
PLANSnon-reserved   
PLI non-reservednon-reservednon-reserved
POLICYnon-reserved   
PORTION reservedreserved 
POSITIONnon-reserved (cannot be function or type)reservedreservedreserved
POSITION_REGEX reservedreserved 
POWER reservedreserved 
PRECEDES reservedreserved 
PRECEDINGnon-reservednon-reservednon-reserved 
PRECISIONnon-reserved (cannot be function or type), requires ASreservedreservedreserved
PREPAREnon-reservedreservedreservedreserved
PREPAREDnon-reserved   
PRESERVEnon-reservednon-reservednon-reservedreserved
PRIMARYreservedreservedreservedreserved
PRIORnon-reservednon-reservednon-reservedreserved
PRIVATE non-reserved  
PRIVILEGESnon-reservednon-reservednon-reservedreserved
PROCEDURALnon-reserved   
PROCEDUREnon-reservedreservedreservedreserved
PROCEDURESnon-reserved   
PROGRAMnon-reserved   
PRUNE non-reserved  
PTF reserved  
PUBLIC non-reservednon-reservedreserved
PUBLICATIONnon-reserved   
QUOTEnon-reserved   
QUOTES non-reserved  
RANGEnon-reservedreservedreserved 
RANK reservedreserved 
READnon-reservednon-reservednon-reservedreserved
READS reservedreserved 
REALnon-reserved (cannot be function or type)reservedreservedreserved
REASSIGNnon-reserved   
RECHECKnon-reserved   
RECOVERY non-reservednon-reserved 
RECURSIVEnon-reservedreservedreserved 
REFnon-reservedreservedreserved 
REFERENCESreservedreservedreservedreserved
REFERENCINGnon-reservedreservedreserved 
REFRESHnon-reserved   
REGR_AVGX reservedreserved 
REGR_AVGY reservedreserved 
REGR_COUNT reservedreserved 
REGR_INTERCEPT reservedreserved 
REGR_R2 reservedreserved 
REGR_SLOPE reservedreserved 
REGR_SXX reservedreserved 
REGR_SXY reservedreserved 
REGR_SYY reservedreserved 
REINDEXnon-reserved   
RELATIVEnon-reservednon-reservednon-reservedreserved
RELEASEnon-reservedreservedreserved 
RENAMEnon-reserved   
REPEATABLEnon-reservednon-reservednon-reservednon-reserved
REPLACEnon-reserved   
REPLICAnon-reserved   
REQUIRING non-reservednon-reserved 
RESETnon-reserved   
RESPECT non-reservednon-reserved 
RESTARTnon-reservednon-reservednon-reserved 
RESTORE non-reservednon-reserved 
RESTRICTnon-reservednon-reservednon-reservedreserved
RESULT reservedreserved 
RETURNnon-reservedreservedreserved 
RETURNED_CARDINALITY non-reservednon-reserved 
RETURNED_LENGTH non-reservednon-reservednon-reserved
RETURNED_​OCTET_​LENGTH non-reservednon-reservednon-reserved
RETURNED_SQLSTATE non-reservednon-reservednon-reserved
RETURNINGreserved, requires ASnon-reservednon-reserved 
RETURNSnon-reservedreservedreserved 
REVOKEnon-reservedreservedreservedreserved
RIGHTreserved (can be function or type)reservedreservedreserved
ROLEnon-reservednon-reservednon-reserved 
ROLLBACKnon-reservedreservedreservedreserved
ROLLUPnon-reservedreservedreserved 
ROUTINEnon-reservednon-reservednon-reserved 
ROUTINESnon-reserved   
ROUTINE_CATALOG non-reservednon-reserved 
ROUTINE_NAME non-reservednon-reserved 
ROUTINE_SCHEMA non-reservednon-reserved 
ROWnon-reserved (cannot be function or type)reservedreserved 
ROWSnon-reservedreservedreservedreserved
ROW_COUNT non-reservednon-reservednon-reserved
ROW_NUMBER reservedreserved 
RULEnon-reserved   
RUNNING reserved  
SAVEPOINTnon-reservedreservedreserved 
SCALAR non-reserved  
SCALE non-reservednon-reservednon-reserved
SCHEMAnon-reservednon-reservednon-reservedreserved
SCHEMASnon-reserved   
SCHEMA_NAME non-reservednon-reservednon-reserved
SCOPE reservedreserved 
SCOPE_CATALOG non-reservednon-reserved 
SCOPE_NAME non-reservednon-reserved 
SCOPE_SCHEMA non-reservednon-reserved 
SCROLLnon-reservedreservedreservedreserved
SEARCHnon-reservedreservedreserved 
SECONDnon-reserved, requires ASreservedreservedreserved
SECTION non-reservednon-reservedreserved
SECURITYnon-reservednon-reservednon-reserved 
SEEK reserved  
SELECTreservedreservedreservedreserved
SELECTIVE non-reservednon-reserved 
SELF non-reservednon-reserved 
SENSITIVE reservedreserved 
SEQUENCEnon-reservednon-reservednon-reserved 
SEQUENCESnon-reserved   
SERIALIZABLEnon-reservednon-reservednon-reservednon-reserved
SERVERnon-reservednon-reservednon-reserved 
SERVER_NAME non-reservednon-reservednon-reserved
SESSIONnon-reservednon-reservednon-reservedreserved
SESSION_USERreservedreservedreservedreserved
SETnon-reservedreservedreservedreserved
SETOFnon-reserved (cannot be function or type)   
SETSnon-reservednon-reservednon-reserved 
SHAREnon-reserved   
SHOWnon-reservedreserved  
SIMILARreserved (can be function or type)reservedreserved 
SIMPLEnon-reservednon-reservednon-reserved 
SIN reserved  
SINH reserved  
SIZE non-reservednon-reservedreserved
SKIPnon-reservedreserved  
SMALLINTnon-reserved (cannot be function or type)reservedreservedreserved
SNAPSHOTnon-reserved   
SOMEreservedreservedreservedreserved
SOURCE non-reservednon-reserved 
SPACE non-reservednon-reservedreserved
SPECIFIC reservedreserved 
SPECIFICTYPE reservedreserved 
SPECIFIC_NAME non-reservednon-reserved 
SQLnon-reservedreservedreservedreserved
SQLCODE   reserved
SQLERROR   reserved
SQLEXCEPTION reservedreserved 
SQLSTATE reservedreservedreserved
SQLWARNING reservedreserved 
SQRT reservedreserved 
STABLEnon-reserved   
STANDALONEnon-reservednon-reservednon-reserved 
STARTnon-reservedreservedreserved 
STATE non-reservednon-reserved 
STATEMENTnon-reservednon-reservednon-reserved 
STATIC reservedreserved 
STATISTICSnon-reserved   
STDDEV_POP reservedreserved 
STDDEV_SAMP reservedreserved 
STDINnon-reserved   
STDOUTnon-reserved   
STORAGEnon-reserved   
STOREDnon-reserved   
STRICTnon-reserved   
STRING non-reserved  
STRIPnon-reservednon-reservednon-reserved 
STRUCTURE non-reservednon-reserved 
STYLE non-reservednon-reserved 
SUBCLASS_ORIGIN non-reservednon-reservednon-reserved
SUBMULTISET reservedreserved 
SUBSCRIPTIONnon-reserved   
SUBSET reserved  
SUBSTRINGnon-reserved (cannot be function or type)reservedreservedreserved
SUBSTRING_REGEX reservedreserved 
SUCCEEDS reservedreserved 
SUM reservedreservedreserved
SUPPORTnon-reserved   
SYMMETRICreservedreservedreserved 
SYSIDnon-reserved   
SYSTEMnon-reservedreservedreserved 
SYSTEM_TIME reservedreserved 
SYSTEM_USER reservedreservedreserved
T non-reservednon-reserved 
TABLEreservedreservedreservedreserved
TABLESnon-reserved   
TABLESAMPLEreserved (can be function or type)reservedreserved 
TABLESPACEnon-reserved   
TABLE_NAME non-reservednon-reservednon-reserved
TAN reserved  
TANH reserved  
TEMPnon-reserved   
TEMPLATEnon-reserved   
TEMPORARYnon-reservednon-reservednon-reservedreserved
TEXTnon-reserved   
THENreservedreservedreservedreserved
THROUGH non-reserved  
TIESnon-reservednon-reservednon-reserved 
TIMEnon-reserved (cannot be function or type)reservedreservedreserved
TIMESTAMPnon-reserved (cannot be function or type)reservedreservedreserved
TIMEZONE_HOUR reservedreservedreserved
TIMEZONE_MINUTE reservedreservedreserved
TOreserved, requires ASreservedreservedreserved
TOKEN non-reservednon-reserved 
TOP_LEVEL_COUNT non-reservednon-reserved 
TRAILINGreservedreservedreservedreserved
TRANSACTIONnon-reservednon-reservednon-reservedreserved
TRANSACTIONS_​COMMITTED non-reservednon-reserved 
TRANSACTIONS_​ROLLED_​BACK non-reservednon-reserved 
TRANSACTION_ACTIVE non-reservednon-reserved 
TRANSFORMnon-reservednon-reservednon-reserved 
TRANSFORMS non-reservednon-reserved 
TRANSLATE reservedreservedreserved
TRANSLATE_REGEX reservedreserved 
TRANSLATION reservedreservedreserved
TREATnon-reserved (cannot be function or type)reservedreserved 
TRIGGERnon-reservedreservedreserved 
TRIGGER_CATALOG non-reservednon-reserved 
TRIGGER_NAME non-reservednon-reserved 
TRIGGER_SCHEMA non-reservednon-reserved 
TRIMnon-reserved (cannot be function or type)reservedreservedreserved
TRIM_ARRAY reservedreserved 
TRUEreservedreservedreservedreserved
TRUNCATEnon-reservedreservedreserved 
TRUSTEDnon-reserved   
TYPEnon-reservednon-reservednon-reservednon-reserved
TYPESnon-reserved   
UESCAPEnon-reservedreservedreserved 
UNBOUNDEDnon-reservednon-reservednon-reserved 
UNCOMMITTEDnon-reservednon-reservednon-reservednon-reserved
UNCONDITIONAL non-reserved  
UNDER non-reservednon-reserved 
UNENCRYPTEDnon-reserved   
UNIONreserved, requires ASreservedreservedreserved
UNIQUEreservedreservedreservedreserved
UNKNOWNnon-reservedreservedreservedreserved
UNLINK non-reservednon-reserved 
UNLISTENnon-reserved   
UNLOGGEDnon-reserved   
UNMATCHED reserved  
UNNAMED non-reservednon-reservednon-reserved
UNNEST reservedreserved 
UNTILnon-reserved   
UNTYPED non-reservednon-reserved 
UPDATEnon-reservedreservedreservedreserved
UPPER reservedreservedreserved
URI non-reservednon-reserved 
USAGE non-reservednon-reservedreserved
USERreservedreservedreservedreserved
USER_​DEFINED_​TYPE_​CATALOG non-reservednon-reserved 
USER_​DEFINED_​TYPE_​CODE non-reservednon-reserved 
USER_​DEFINED_​TYPE_​NAME non-reservednon-reserved 
USER_​DEFINED_​TYPE_​SCHEMA non-reservednon-reserved 
USINGreservedreservedreservedreserved
UTF16 non-reserved  
UTF32 non-reserved  
UTF8 non-reserved  
VACUUMnon-reserved   
VALIDnon-reservednon-reservednon-reserved 
VALIDATEnon-reserved   
VALIDATORnon-reserved   
VALUEnon-reservedreservedreservedreserved
VALUESnon-reserved (cannot be function or type)reservedreservedreserved
VALUE_OF reservedreserved 
VARBINARY reservedreserved 
VARCHARnon-reserved (cannot be function or type)reservedreservedreserved
VARIADICreserved   
VARYINGnon-reserved, requires ASreservedreservedreserved
VAR_POP reservedreserved 
VAR_SAMP reservedreserved 
VERBOSEreserved (can be function or type)   
VERSIONnon-reservednon-reservednon-reserved 
VERSIONING reservedreserved 
VIEWnon-reservednon-reservednon-reservedreserved
VIEWSnon-reserved   
VOLATILEnon-reserved   
WHENreservedreservedreservedreserved
WHENEVER reservedreservedreserved
WHEREreserved, requires ASreservedreservedreserved
WHITESPACEnon-reservednon-reservednon-reserved 
WIDTH_BUCKET reservedreserved 
WINDOWreserved, requires ASreservedreserved 
WITHreserved, requires ASreservedreservedreserved
WITHINnon-reserved, requires ASreservedreserved 
WITHOUTnon-reserved, requires ASreservedreserved 
WORKnon-reservednon-reservednon-reservedreserved
WRAPPERnon-reservednon-reservednon-reserved 
WRITEnon-reservednon-reservednon-reservedreserved
XMLnon-reservedreservedreserved 
XMLAGG reservedreserved 
XMLATTRIBUTESnon-reserved (cannot be function or type)reservedreserved 
XMLBINARY reservedreserved 
XMLCAST reservedreserved 
XMLCOMMENT reservedreserved 
XMLCONCATnon-reserved (cannot be function or type)reservedreserved 
XMLDECLARATION non-reservednon-reserved 
XMLDOCUMENT reservedreserved 
XMLELEMENTnon-reserved (cannot be function or type)reservedreserved 
XMLEXISTSnon-reserved (cannot be function or type)reservedreserved 
XMLFORESTnon-reserved (cannot be function or type)reservedreserved 
XMLITERATE reservedreserved 
XMLNAMESPACESnon-reserved (cannot be function or type)reservedreserved 
XMLPARSEnon-reserved (cannot be function or type)reservedreserved 
XMLPInon-reserved (cannot be function or type)reservedreserved 
XMLQUERY reservedreserved 
XMLROOTnon-reserved (cannot be function or type)   
XMLSCHEMA non-reservednon-reserved 
XMLSERIALIZEnon-reserved (cannot be function or type)reservedreserved 
XMLTABLEnon-reserved (cannot be function or type)reservedreserved 
XMLTEXT reservedreserved 
XMLVALIDATE reservedreserved 
YEARnon-reserved, requires ASreservedreservedreserved
YESnon-reservednon-reservednon-reserved 
ZONEnon-reservednon-reservednon-reservedreserved