Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.5
  Go To Table Of Contents
 Search
 PDFComments
Comments


sql.hint

Use eclipselink.sql.hint to include an SQL hint in the SQL for a query.


Values

Table 4-39 describes this query hint's values.

Table 4-39 Valid Values for sql.hint

Value Description

value

The full hint string, including the comment \ delimiters



Usage

A SQL hint can be used on certain database platforms to define how the query uses indexes and other such low level usages. The SQL hint will be included in the SQL, after the SELECT/INSERT/UPDATE/DELETE command.


Examples

Example 4-79 shows how to use this hint in a JPA query.

Example 4-79 Using sql.hint in a JPA Query


Example 4-80 shows how to use this hint with the @QueryHint annotation.

Example 4-80 Using sql.hint in a @QueryHint Annotation



See Also

For more information, see: