Skip to main content

Supported Keywords

Query Language KeywordDescriptionExample
ANDLogical operator used to create complex expressions by combining two or more expressions to produce a Boolean result. When you combine two conditional expressions using the AND operator, both conditions must evaluate to true for the entire expression to be true.See Operators
ASUsed to provide a label for a path expression so you can refer to the path by the label later.See Aliases and Synonyms
AVGReturns the average arithmetic mean of the set formed by the selected expression. The type of the expression must evaluate to a java.lang.Number.See AVG
COUNTReturns the quantity of values in the set formed by the selected expression.See COUNT
DISTINCTRestricts the select statement to unique results (eliminates duplicates).See DISTINCT
ELEMENTQuery function. Extracts a single element from a collection or array. This function throws a FunctionDomainException if the argument is not a collection or array with exactly one element.See Preset Query Functions
FROMYou can access any object or object attribute that is available in the current scope of the query.See FROM Clause
GROUP BYAllows you to summarize data, arranging or grouping results by identical field(s).See GROUP BY
<HINT>Keyword that instructs the query engine to prefer certain indexes.See Using Query Index Hints
IMPORTUsed to establish the name for a class in a query.See IMPORT Statement
INThe IN expression is a Boolean indicating whether one expression is present inside a collection of expressions of a compatible type.See IN and SET
IS_DEFINEDQuery function. Returns TRUE if the expression does not evaluate to UNDEFINED. Inequality queries include undefined values in their query results. With the IS_DEFINED function, you can limit results to only those elements with defined values.See Preset Query Functions
IS_UNDEFINEDQuery function. Returns TRUE if the expression evaluates to UNDEFINED. With the exception of inequality queries, most queries do not include undefined values in their query results. The IS_UNDEFINED function allows undefined values to be included, so you can identify elements with undefined values.See Preset Query Functions
LIMITLimits the number of returned results. If you use the limit keyword, you cannot also run operations on the query result set that perform any kind of summary activities. For example trying to run add or addAll or a SelectResult from a query with a LIMIT clause throws an exception.See LIMIT
LIKELIKE can be used to mean 'equals to', or if you terminate the string with a wildcard character (%), it behaves like 'starts with'. Note that the wildcard can only be used at the end of the comparison string. You can escape the wildcard character to represent the % character. You can also use the LIKE predicate if an index is present.See LIKE
MINReturns the minimum or smallest value from the selected expression. The type of the expression must evaluate to a java.lang.Comparable.See MIN
MAXReturns the maximum or largest value from the selected expression. The type of the expression must evaluate to a java.lang.Comparable.See MAX
NOTThe example returns the set of portfolios that have positions. Note that NOT cannot use an index.See Operators
NVLReturns expr2 if expr1 is null. The expressions can be query parameters (bind arguments), path expressions, or literals.See Preset Query Functions
ORIf an expression uses both AND and OR operators, the AND expression has higher precedence than OR.See Operators
ORDER BYAllows you to order query results (either in ascending or descending order).See ORDER BY
SELECTAllows you to filter data from the collection of object(s) returned by a WHERE search operation.See SELECT Statement
SETSpecifies a collection of values that can be compared to the returned values of query.See IN and SET
SUMReturns the summation over the set formed by the selected expression. The type of the expression must evaluate to a java.lang.Number.See SUM
<TRACE>Enables debugging on the following query string.See Query Debugging
TO_DATEReturns a Java Data class object. The arguments must be String S with date_str representing the date and format_str representing the format used by date_str. The format_str you provide is parsed using java.text.SimpleDateFormat.See Preset Query Functions
TYPESpecifying object type in the FROM clause helps the query engine to process the query at optimal speed.See Object Typing
WHEREResolves to a collection of objects. The collection is then available for iteration in the query expressions that follow in the WHERE clause.See WHERE Clause