雪花滴 TABLE table_name(...)

Snowflake DROP TABLE table_name(...)

为什么下面的语法不会出错:

CREATE TABLE a1 AS SELECT 1 a;

TRUNCATE TABLE a1(sth);
-- SQL compilation error: syntax error line 1 at position 17 unexpected '('.

DROP TABLE a1(sth);
-- A1 successfully dropped.
-- here I would expect an error

两个TRUNCATE TABLE and DROP TABLE都带参数<name>

Specifies the identifier for the table to drop. If the identifier contains spaces, special characters, or mixed-case characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive (e.g. "My Object").

table_name(...) 有特殊行为吗?

在"drop table"中,table名称不接受任何参数,所以它不应该接受任何括号。请打开工单并将此错误报告给 Snowflake。