Rate This Document
Findability
Accuracy
Completeness
Readability

Support for SELECT Statement Elements

A complete set of SELECT statement elements is as follows. For details about the syntax of the SELECT statement, visit the official website of MySQL at https://dev.mysql.com/doc/refman/8.0/en/select.html.

SELECT
[ALL | DISTINCT | DISTINCTROW ]
[HIGH_PRIORITY]
[STRAIGHT_JOIN]
[SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
[SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
select_expr [, select_expr] ...
[into_option]
[FROM table_references
[PARTITION partition_list]]
[WHERE where_condition]
[GROUP BY {col_name | expr | position}, ... [WITH ROLLUP]]
[HAVING where_condition]
[WINDOW window_name AS (window_spec)
[, window_name AS (window_spec)] ...]
[ORDER BY {col_name | expr | position}
[ASC | DESC], ... [WITH ROLLUP]]
[LIMIT {[offset,] row_count | row_count OFFSET offset}]
[into_option]
[FOR {UPDATE | SHARE}
[OF tbl_name [, tbl_name] ...]
[NOWAIT | SKIP LOCKED]
| LOCK IN SHARE MODE]
[into_option]

into_option: {
INTO OUTFILE 'file_name'
[CHARACTER SET charset_name]
export_options
| INTO DUMPFILE 'file_name'
| INTO var_name [, var_name] ...
}

Table 1 describes the support for each element in the SELECT statement.

Table 1 Support for the SELECT Statement

SELECT Statement Element

Description

Supported or Not

[ALL | DISTINCT | DISTINCTROW]

  • DISTINCT and DISTINCTROW indicate that duplicate columns are returned.
  • ALL (or not using ALL, DISTINCT and DISTINCTROW) indicates that all records are returned.
  • Only ALL is supported.
  • DISTINCT or DISTINCTROW is not supported.

[HIGH_PRIORITY]

Serves for the optimizer and does not affect the execution result set.

This keyword applies to the MySQL optimizer and does not affect KOVAE's execution or judgment.

[STRAIGHT_JOIN]

Serves for the optimizer and does not affect the execution result set.

This keyword applies to the MySQL optimizer and does not affect KOVAE's execution or judgment.

[SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]

Serves for the optimizer and does not affect the execution result set.

This keyword applies to the MySQL optimizer and does not affect KOVAE's execution or judgment.

[SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]

Serves for the optimizer and does not affect the execution result set.

This keyword applies to the MySQL optimizer and does not affect KOVAE's execution or judgment.

select_expr [, select_expr] …

Indicates the expression of the SELECT list. KOVAE judges the type of each item and parameter, and performs recursive judgment on each parameter.

Some are supported. For details, see Support for Item Types.

[into_option]

Indicates that the result set is written to files on the server.

Not supported. This is not a common scenario.

[FROM table_references

[PARTITION partition_list]]

Indicates the relationship between SQL-related tables and JOIN.

  • Some table access types are supported. For details, see Table 3.
  • Only non-temporary tables are supported.
  • Only InnoDB tables are supported.
  • Full-text indexes are not supported.
  • Partitioned tables are not supported.

[WHERE where_condition]

Indicates the expression of the WHERE condition. KOVAE judges the type of each item and parameter, and performs recursive judgment on each parameter.

Some are supported. For details, see Support for Item Types.

[GROUP BY {col_name | expr | position}, ... [WITH ROLLUP]]

Indicates the GROUP BY clause. KOVAE judges the type of each item and parameter, and performs recursive judgment on each parameter.

Some are supported. For details, see Support for Item Types.

[HAVING where_condition]

Indicates the expression of the HAVING condition. KOVAE judges the type of each item and parameter, and performs recursive judgment on each parameter.

Some are supported. For details, see Support for Item Types.

[WINDOW window_name AS (window_spec) [, window_name AS (window_spec)] ...]

Indicates window functions.

Not supported.

[ORDER BY {col_name | expr | position}

[ASC | DESC], ... [WITH ROLLUP]]

Indicates the ORDER BY clause. KOVAE judges the type of each item and parameter, and performs recursive judgment on each parameter.

Some are supported. For details, see Support for Item Types.

[LIMIT {[offset,] row_count | row_count OFFSET offset}]

Indicates the LIMIT clause.

Supported.

[into_option]

Indicates that the result set is written to files on the server.

Not supported. This is not a common scenario.

[FOR {UPDATE | SHARE}

[OF tbl_name [, tbl_name] ...]

[NOWAIT | SKIP LOCKED]

| LOCK IN SHARE MODE]

Indicates that locking reads are performed on the queried data.

Not supported.

[into_option]

Indicates that the result set is written to files on the server.

Not supported. This is not a common scenario.

Table 2 Support for other items

Item

Supported or Not

Statement type

Only the same type of statement (SELECT query) as SQLCOM_SELECT is supported. Other statement types such as UPDATE are not supported.

Union

Simple non-UNION SELECT statements are supported.

Number of primary tables/number of constant tables

In the query, the situation in which primary tables contain constant tables is not supported.

AGG row number estimation

Execution plans that have not fully evaluated AGG are not supported.

Querying the maximum number of fields

Query statement containing the number of fields greater than the value of MAX_FIELDS is not supported.

Query in which the optimizer determines an empty result set

If the optimizer has determined that the query result set must be an empty set, the query is not supported.

Character set

Only the UTF8MB4 character set is supported.

Only the first five table access types in Table 3 are supported.

Table 3 Support for table access types

Table Access Type

Description

Supported or Not

JT_EQ_REF

Equality matching on the unique index

Supported

JT_REF

Equality matching on non-unique indexes

Supported

JT_ALL

Full table scan

Supported

JT_RANGE

Range scan

Supported

JT_INDEX_SCAN

Scan on leaf nodes of indexes

Supported

JT_SYSTEM

-

Not supported

JT_CONST

-

Not supported

JT_FT

-

Not supported

JT_REF_OR_NULL

-

Not supported

JT_INDEX_MERGE

-

Not supported