Tag Archives: Snowflake for Beginners

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 …

Snowflake for Beginners – Create Temporary Table

Create Temporary Table Create Temporary Table The temporary table will last until the session ends. – Create a table called SUPERHEROES. CREATE OR REPLACE TEMP 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 …

Snowflake for Beginners – Delete A Table

Delete 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 – Sort Rows By A Column’s Values

Sort Rows By A Column’s Values Create Table Of Superheroes – Create a table called SUPERHEROES. CREATE OR REPLACE TABLE SUPERHEROES ( – Column called ALTER_EGO allowing up to 100 characters “ALTER_EGO” VARCHAR(100), – Column called BANK_BALANCE allowing 38 digits with 2 after the decimal point “AGE” INT, – Column called STATE allowing up to …

Snowflake for Beginners – Add Column

Add 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 – Add Comment To Column

Add Comment To 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 …

Snowflake for Beginners – Convert Data Types

Convert Data Types Create Table Of Superheroes – Create a table called SUPERHEROES. 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 “ALTER_EGO” VARCHAR(100), – Column …

Snowflake for Beginners – Create Dummy Columns

Create Dummy Columns Create Table Of Superheroes – Create a table called SUPERHEROES. CREATE OR REPLACE TABLE SUPERHEROES ( – Column called ALTER_EGO allowing up to 100 characters “ALTER_EGO” VARCHAR(100), – Column called BANK_BALANCE allowing 38 digits with 2 after the decimal point “AGE” INT, – Column called STATE allowing up to 100 characters “STATE” …

Snowflake for Beginners – Get Absolute Values

Get Absolute Values Create Temporary Table 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 “ALTER_EGO” VARCHAR(100), – Column called BANK_BALANCE allowing 38 digits with 2 …