1.3. Column Names and Reserved Words

The ANSI Standard reserves a number of SQL keywords from being used as column names. The SAS SQL implementation is not as rigid, but users should be aware of what reserved words exist to prevent unexpected and unintended results during SQL processing. Column names should conform to proper SAS naming conventions (as described in the SAS Language Reference), and they should not conflict with certain reserved words found in the SQL language. The following list identifies the reserved words found in the ANSI SQL standard.

ANSI SQL Reserved Words

ASINNEROUTER
CASEINTERSECTRIGHT
EXCEPTJOINUNION
FROMLEFTUPPER
FULLLOWERUSER
GROUPONWHEN
HAVINGORDERWHERE

You probably will not encounter too many conflicts between a column ...

Get PROC SQL: Beyond the Basics Using SAS® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.