0
votes

Why the below syntax does not error out:

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

Both TRUNCATE TABLE and DROP TABLE take parameter <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").

Is there a special behaviour for table_name(...)?

1

1 Answers

1
votes

In "drop table", the table name does not accept any parameters so it should not accept any parentheses. Please open a ticket and report this bug to Snowflake.