2.10.2.3.1. JPQL FROM Identifiers

An identifier is a character sequence of unlimited length. The character sequence must begin with a Java identifier start character, and all other characters must be Java identifier part characters. An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. This includes the underscore (_) character and the dollar sign ($) character. An identifier part character is any character for which the method Character.isJavaIdentifierPart returns true. The question mark (?) character is reserved for use by the Java Persistence query language. The following are reserved identifiers:

  • ABS

  • ALL

  • AND

  • ANY

  • AS

  • ASC

  • AVG

  • BETWEEN

  • BIT_LENGTH

  • BOTH

  • BY

  • CASE

  • CEILING

  • CHAR_LENGTH

  • CHARACTER_LENGTH

  • CLASS

  • COALESCE

  • CONCAT

  • COUNT

  • CURRENT_DATE

  • CURRENT_TIME

  • CURRENT_TIMESTAMP

  • DELETE

  • DESC

  • DISTINCT

  • ELSE

  • EMPTY

  • END

  • ENTRY

  • ESCAPE

  • EXISTS

  • EXP

  • EXTRACT

  • FALSE

  • FETCH

  • FLOOR

  • FROM

  • GROUP

  • HAVING

  • IN

  • INDEX

  • INNER

  • IS

  • JOIN

  • KEY

  • LEADING

  • LEFT

  • LENGTH

  • LIKE

  • LOCAL

  • LN

  • LOCATE

  • LOWER

  • MAX

  • MEMBER

  • MIN

  • MOD

  • NEW

  • NOT

  • NULL

  • NULLIF

  • OBJECT

  • OF

  • ON

  • OR

  • ORDER

  • OUTER

  • POSITION

  • POWER

  • ROUND

  • SELECT

  • SET

  • SIGN

  • SIZE

  • SOME

  • SQRT

  • SIBSTRING

  • SUM

  • THEN

  • TRAILING

  • TREAT

  • TRIM

  • TRUE

  • TYPE

  • UNKNOWN

  • UPDATE

  • UPPER

  • VALUE

  • WHEN

  • WHERE

Reserved identifiers are case insensitive. Reserved identifiers must not be used as identification variables or result variables.

Note

It is recommended that other SQL reserved words also not be used as identification variables in queries because they may be used as reserved identifiers in future releases of the specification.

Note

BIT_LENGTH, CHAR_LENGTH, CHARACTER_LENGTH, POSITION, and UNKNOWN are not currently used: they are reserved for future use.