All Products
Search
Document Center

MaxCompute:Overview of MaxCompute SQL

Last Updated:Feb 19, 2024

MaxCompute SQL is the SQL syntax that is used in MaxCompute for data queries and analysis. The MaxCompute SQL syntax is similar to the standard SQL syntax and is an extension of the standard ANSI SQL-92 syntax for scenarios where large-scale data warehouses are used. This topic describes the scenarios of MaxCompute SQL and the tools that are supported by MaxCompute SQL. This topic also provides instructions on how to use MaxCompute SQL.

Scenarios

MaxCompute SQL is suitable for scenarios in which batch jobs are run to compute gigabytes, terabytes, or exabytes of data. After you submit a MaxCompute SQL job, queue scheduling may occur and lasts for tens of seconds to several minutes. In this scenario, you can submit a batch job to process large amounts of data at the same time. We recommend that you do not connect MaxCompute to a foreground business system that needs to handle thousands to tens of thousands of transactions per second.

Instructions

Operation

References

Description

Learn about MaxCompute SQL

Differences in the support for SQL statements

Describes the syntax differences between MaxCompute SQL and mainstream databases.

Reserved words and keywords

Describes reserved words and keywords in MaxCompute SQL statements.

Data types

Describes the data types that are supported by MaxCompute SQL, data type editions, and differences between the data type editions.

Type conversions

Describes the type conversions that are supported by MaxCompute SQL.

Data type mappings between MaxCompute and Hive, MySQL, and Oracle

Describes the data type differences between MaxCompute SQL and mainstream databases.

Escape character

Describes the escape characters in MaxCompute SQL.

LIKE

Describes the characters that are supported by the LIKE operator for character matching in MaxCompute SQL.

RLIKE

Describes the characters that are supported by the RLIKE operator for character matching in MaxCompute SQL.

Operator

Describes the relational operators, arithmetic operators, bitwise operators, and logical operators in MaxCompute.

Use MaxCompute SQL

Limits

Describes the limits of MaxCompute SQL to help you write scripts that meet specific rules.

DDL statements

Describes the syntax of the DDL statements that are supported by MaxCompute SQL, such as the DDL statements that are used to manage tables, lifecycles, partitions, and columns.

DML statements

Describes the syntax of the DML statements that are supported by MaxCompute SQL, such as INSERT INTO and INSERT OVERWRITE.

DQL statements

Describes the syntax of the SELECT statements that are supported by MaxCompute SQL. The SELECT statements are used to query data.

Enhanced SQL syntax

Describes the syntax of the statements that can be used to improve the readability and execution efficiency of MaxCompute SQL, such as LOAD and UNLOAD.

MaxCompute UDF

Describes user-defined functions that are supported by MaxCompute, including user-defined scalar functions (UDFs), user-defined table-valued functions (UDTFs), and user-defined aggregate functions (UDAFs), and provides instructions on how to create these functions.

MaxCompute UDT

Describes how to directly call the classes and methods of third-party programming languages in SQL, or how to directly use third-party objects to obtain data.

MaxCompute UDJ

Describes how to perform custom operations across tables or on multiple tables.

Run MaxCompute SQL in script mode

Describes how to compile SQL scripts in script mode.

Related tools

You can develop MaxCompute SQL jobs by using related tools based on the complexity of the jobs.