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

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Queries and data modification » 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