Snowflake for Beginners

Snowflake for Beginners – Describe A Table

Describe A Table Create Table Of Superheroes – Create a table called SUPERHEROES. If it already exists, replace it. CREATE OR REPLACE TABLE SUPERHEROES ( – Column called ID allowing up to five characters “ID” VARCHAR(5), – Column called NAME allowing up to 100 characters “NAME” VARCHAR(100), – Column called ALTER_EGO allowing up to 100 …

Snowflake for Beginners – Drop Column

Drop Column Create Table Of Superheroes – Create a table called SUPERHEROES. If it already exists, replace it. CREATE OR REPLACE TABLE SUPERHEROES ( – Column called ID allowing up to five characters “ID” VARCHAR(5), – Column called NAME allowing up to 100 characters “NAME” VARCHAR(100), – Column called ALTER_EGO allowing up to 100 characters …

Snowflake for Beginners – Query DESCRIBE TABLE like a table

Query DESCRIBE TABLE like a table   DESCRIBE TABLE is a powerful tool for understanding the structure of a table. However, in Snowflake the output of DESCRIBE TABLE is not treated like a regular table (i.e. can be manipulated using SELECT). To query DESCRIBE TABLE as a regular table we have to first run it, then run a SELECT query on the last query …

Snowflake for Beginners – Rename Column

Rename Column Create Table Of Superheroes – Create a table called SUPERHEROES. If it already exists, replace it. CREATE OR REPLACE TABLE SUPERHEROES ( – Column called ID allowing up to five characters “ID” VARCHAR(5), – Column called NAME allowing up to 100 characters “NAME” VARCHAR(100), – Column called ALTER_EGO allowing up to 100 characters …

Snowflake for Beginners – Undelete A Table

Undelete A Table Create Table Of Superheroes – Create a table called SUPERHEROES. If it already exists, replace it. CREATE OR REPLACE TABLE SUPERHEROES ( – Column called ID allowing up to five characters “ID” VARCHAR(5), – Column called NAME allowing up to 100 characters “NAME” VARCHAR(100), – Column called ALTER_EGO allowing up to 100 …

Snowflake for Beginners – View A Column’s Comments

View A Column’s Comments Create Table Of Superheroes With Comments Column comments concern a particular column, while table comments are about the entire table. – Create a table called SUPERHEROES. If it already exists, replace it. CREATE OR REPLACE TABLE SUPERHEROES ( – Column called ID allowing up to five characters with a comment. “ID” …

Snowflake for Beginners – View A Table’s Comments

View A Table’s Comments Create Table Of Superheroes With Comments Column comments concern a particular column, while table comments are about the entire table. – Create a table called SUPERHEROES. If it already exists, replace it. CREATE OR REPLACE TABLE SUPERHEROES ( – Column called ID allowing up to five characters with a comment. “ID” …

Snowflake for Beginners – Create Table

Create Table Create Table – Create a table called SUPERHEROES. CREATE TABLE SUPERHEROES ( – Column called ID allowing up to five characters “ID” VARCHAR (5), – Column called NAME allowing up to 100 characters “NAME” VARCHAR(100), – Column called ALTER_EGO allowing up to 100 characters “ALTER_EGO” VARCHAR(100), – Column called BANK_BALANCE allowing 38 digits …

Snowflake for Beginners – Create Table If It Doesn’t Already Exist

Create Table If It Doesn’t Already Exist Create Table IF NOT EXISTS tells Snowflake to only create the table if another table with the same name does not already exist. This can be useful if you don’t want to run an expensive operation if the data is already there. – Create a table called SUPERHEROES. CREATE …

Snowflake for Beginners – Create Table With Column And Table Comments

Create Table With Column And Table Comments Create Table Of Superheroes With Comments Column comments concern a particular column, while table comments are about the entire table. – Create a table called SUPERHEROES. If it already exists, replace it. CREATE OR REPLACE TABLE SUPERHEROES ( – Column called ID allowing up to five characters with …