You can use equality and ordering operators when you use Java in the database. You cannot:
Reference Java-SQL data items in ordering operations.
Reference Java-SQL data items in equality operations if they are stored in an off-row column.
Use the order by clause, which requires that you determine the sort order.
Make direct comparisons using the “>”, “<”, “<=”, or “>=” operator.
These equality operations are allowed for in-row columns:
Use of the distinct keyword, which is defined in terms of equality of rows, including Java-SQL columns.
Direct comparisons using the “=” and “!=” operators.
Use of the union operator (not union all), which eliminates duplicates, and requires the same kind of comparisons as the distinct clause.
Use of the group by clause, which partitions the rows into sets with equal values of the grouping column.