8

I get that Snowflake has it's own extensions to ANSI SQL such as UNDROP.

However, I would like to know what "dialect" (for want of a better word of SQL) does Snowflake use ?

I read in the docs:

Snowflake supports standard SQL, including a subset of ANSI SQL:1999 and the SQL:2003 analytic extensions https://docs.snowflake.com/en/user-guide/querying.html

So, is the SQL that Snowflake uses recognised anywhere ? I am wondering about the situation when I have a SQL syntax problem and I want to post here on stackoverflow. Do I use tag:snowflake-sql which seems to be just a synonymn for snowflake-cloud-data-platform or is there another SQL-related tag on stackoverflow that I should use ? Obviously I want to get the best SQL-specific answers so I don't want to limit the tags too much if possible.

Is there a list of differences anywhere between ANSI SQL:1999, SQL:2003 and Snowflake ?

5
  • snowflake-cloud-data-platform is the primary tag and you would be able to get the best possible answer for your Snowflake SQL questions. Having said that there is no harm in adding another tag snowflake-sql to your question. Commented Oct 11, 2021 at 12:12
  • @FKayani but the snowflake-sql tag is just a synonym for snowflake-cloud-data-platform so you literally can't use it as a tag. What I worry about is that many SQL questions could be answered by SQL experts who don't necessarily know anything about Snowflake itsef, but using only the snowflake tags means that other SQL experts will not even see it, let alone want to answer it. Commented Oct 11, 2021 at 13:26
  • We're pretty compliant with the ANSI SQL dialect with additions of our own and some additions from other platforms that makes migration far easier Commented Oct 11, 2021 at 22:29
  • @patrick_at_snowflake that's good to know. Is there a list of ANSI standard features that are not supported by Snowflake ? Commented Oct 12, 2021 at 10:57
  • Find some and let us know what doesn't work ;) Commented Oct 12, 2021 at 22:59

2 Answers 2

8

Based on my experience I would say Snowflake SQL is closer to Postgres than MySQL / T-SQL

Sign up to request clarification or add additional context in comments.

Comments

7

Just like every DB they support 90% of of Standard X and +10% different because it's cheap for them to do so, or it allows exposing the underlying conceptual framing the DB is expressed in.

Which really means there is "no standard" that captures "what they do".

A different question might be to flip that on its head and ask "why does one want a standard".

For the case of the post here snowflake-cloud-data-platform is the current accept tag. As long as you don't have too many generic sql or other DB-specific tags used, using any SQL that runs on Snowflake, is acceptable.

Many people, like Gordan, will give answers in standard ANSI SQL and those answers are wonderful, but can sometimes be expressed in a more dense form given snowflakes less rigid expression tree rules.

The other reason to want to know about standards is the classic, "we want to write standard SQL so we can move later" to which I often think, you should write the fastest performing SQL you can express, and move providers and re-express the intentions in the new DB instead of running poorly optimized "run anywhere" SQL that costs 30% more each and every month, because in 4 years time there might be a 6 month DB move project.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.