Snowflake SQL: Creating a Table

This blog will cover creating a table and inputting your data using SQL code within Snowflake.

The SQL code to create a table starts with a CREATE TABLE operator

CREATE TABLE TIL_Playground.Temp.NB
(
colunm1 number (38,0)
,colunm2 number (38,0)
);

To insert values under the column names use the INSERT and INTO function and select the table name you just created. This is followed by the VALUES function in which you can enter the values of a columns which is defined by brackets. The values for each column is split by commas. With the example below, there are 2 columns and 5 rows.

To view the finished table use the SELECT function on all * FROM the table name you created.

ta-dah, that is how to simply create a table within snowflake using SQL.

Author:
Numa Begum
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab