Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » SQL Anywhere Server - SQL Usage » Query and modify data » Use of subqueries » Optimizer automatic conversion of subqueries to joins


Subquery that follows a comparison operator

A subquery that follows a comparison operator (=, >, <, >=, <=, !=, <>, !>, !<) is called a comparison. The optimizer converts these subqueries to joins if the subquery:

  • returns exactly one value for each row of the main query.

  • does not contain a GROUP BY clause

  • does not contain the keyword DISTINCT

  • is not a UNION query

  • is not an aggregate query