With our last blog post, we started discussing Snowflake and the SELECT statement. Now, if you remember, there is this great thing called a semi-colon.
The main reason you should use the semicolon is to terminate all of your queries. Snowflake does this great thing by default, letting you run one query at a time.
Just by hitting the Control and Enter keys, I can run this query. Let’s see what happens if we hit Control and Enter with no semi-colon.
Notice the blue line along the left-hand side of the screen. That shows the length of the query that Snowflake thinks it is trying to run. As we both know, kind reader, this is not what we really want to happen.
If you want to run multiple lines of code, you do have to select all the lines of code that you want to run before hitting your new favorite key combination – Control and Enter. Now, it will not let you run multiple SELECT queries – just a word of warning. It will return only the results from the last SELECT statement – yes, that’s a fun find when you’re trying to do multiple things quickly.
Next time, we’ll talk more about SELECT and what we can do with it in Snowflake. Yes – before you ask – there are some new things that you can do in Snowflake that you (at least at the moment) cannot do in SQL Server. So until next time my friends!
1 comment