跳到主要内容

EXPLAIN SYNTAX

输出格式化的SQL代码。此命令作为一个SQL格式化工具,使您的代码易于阅读。

语法

EXPLAIN SYNTAX <statement>

示例

EXPLAIN SYNTAX select a, sum(b) as sum from t1 where a in (1, 2) and b > 0 and b < 100 group by a order by a;

----
SELECT
a,
sum(b) AS sum
FROM
t1
WHERE
a IN (1, 2)
AND b > 0
AND b < 100
GROUP BY a
ORDER BY a
EXPLAIN SYNTAX copy into 's3://mybucket/data.csv' from t1 file_format = ( type = CSV field_delimiter = ',' record_delimiter = '\n' skip_header = 1) size_limit=10;

----
COPY
INTO 's3://mybucket/data.csv'
FROM t1
FILE_FORMAT = (
field_delimiter = ",",
record_delimiter = "\n",
skip_header = "1",
type = "CSV"
)
SIZE_LIMIT = 10
开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册