Commands (Alphabetical)

This topic provides a list of all DDL and DML commands, as well as the SELECT command and other related commands, in alphabetical order.

Command Name Summary Category
ALTER <object> Modifies the metadata of an account-level or database object, or the parameters for a session. DDL Commands (by Category)
ALTER ACCOUNT Modifies parameters for your account. Account & Session DDL
ALTER DATABASE Modifies the properties for an existing database, including changing the name of the database and changing the Time Travel data retention period (if you are using Snowflake Enterprise Edition or higher). Database, Schema, & Share DDL
ALTER FILE FORMAT Modifies the properties for an existing file format object. Data Loading / Unloading DDL
ALTER FUNCTION Modifies the properties for an existing UDF (user-defined function). UDF (User-Defined Function) DDL
ALTER MATERIALIZED VIEW Alters a materialized view in the current/specified schema. Table, View, & Sequence DDL
ALTER NETWORK POLICY Modifies the properties for an existing network policy. User & Security DDL
ALTER PIPE Modifies the properties for an existing pipe object. Data Loading / Unloading DDL
ALTER RESOURCE MONITOR Modifies the properties and triggers for an existing resource monitor. Warehouse & Resource Monitor DDL
ALTER ROLE Modifies the properties for an existing role. User & Security DDL
ALTER SCHEMA Modifies the properties for an existing schema, including renaming the schema or swapping it with another schema, and changing the Time Travel data retention period (if you are using Snowflake Enterprise Edition or higher). Database, Schema, & Share DDL
ALTER SEQUENCE Modifies the properties for an existing sequence. Table, View, & Sequence DDL
ALTER SESSION Sets parameters that change the behavior for the current session. Account & Session DDL
ALTER SHARE Modifies the properties for an existing share. Database, Schema, & Share DDL
ALTER STAGE Modifies the properties for an existing named internal or external stage. Data Loading / Unloading DDL
ALTER TABLE Modifies the properties, columns, or constraints for an existing table. Table, View, & Sequence DDL
ALTER TABLE … ALTER COLUMN This topic describes how to modify column properties for a table using the ALTER COLUMN clause in a ALTER TABLE statement. Table, View, & Sequence DDL
ALTER USER Modifies the properties and session parameters for an existing user in the system. User & Security DDL
ALTER VIEW Modifies the properties for an existing view. Table, View, & Sequence DDL
ALTER WAREHOUSE Suspends or resumes a virtual warehouse, or aborts all queries (and other SQL statements) for a warehouse. Warehouse & Resource Monitor DDL
BEGIN Begins a transaction in the current session. Transactions
COMMENT Adds a comment or overwrites an existing comment for an existing object. DDL Commands (by Category)
COMMIT Commits an open transaction in the current session. Transactions
COPY INTO <location> Unloads data from a table (or query) into one or more files in one of the following locations. DML Commands (by Category)
COPY INTO <table> Loads data from staged files to an existing table. DML Commands (by Category)
CREATE <object> Creates a new object of the specified type. DDL Commands (by Category)
CREATE <object> … CLONE Creates a copy of an existing object in the system. Database, Schema, & Share DDL , Table, View, & Sequence DDL , Data Loading / Unloading DDL
CREATE DATABASE Creates a new database in the system. Database, Schema, & Share DDL
CREATE FILE FORMAT Creates a named file format that can be used for bulk loading data into (and unloading data out of) Snowflake tables. Data Loading / Unloading DDL
CREATE FUNCTION Creates a new UDF (user-defined function). UDF (User-Defined Function) DDL
CREATE MANAGED ACCOUNT Creates a new managed account. Account & Session DDL
CREATE MATERIALIZED VIEW Creates a new materialized view in the current/specified schema, based on a query of an existing table, and populates the view with data. Table, View, & Sequence DDL
CREATE NETWORK POLICY Creates a network policy. User & Security DDL
CREATE PIPE Creates a new pipe in the system for defining the COPY INTO <table> statement used by Snowpipe to load data from an ingestion queue into tables. Data Loading / Unloading DDL
CREATE RESOURCE MONITOR Creates a new resource monitor. Warehouse & Resource Monitor DDL
CREATE ROLE Create a new role or replace an existing role in the system. User & Security DDL
CREATE SCHEMA Creates a new schema in the current database. Database, Schema, & Share DDL
CREATE SEQUENCE Creates a new sequence, which can be used for generating sequential, unique numbers. Table, View, & Sequence DDL
CREATE SHARE Creates a new, empty share. Database, Schema, & Share DDL
CREATE STAGE Creates a new named internal or external stage to use for loading data from files into Snowflake tables and unloading data from tables into files. Data Loading / Unloading DDL
CREATE TABLE Creates a new table in the current/specified schema or replaces an existing table. Table, View, & Sequence DDL
CREATE | ALTER TABLE … CONSTRAINT This topic describes how to create constraints by specifying a CONSTRAINT clause in a CREATE TABLE or ALTER TABLE statement. Table, View, & Sequence DDL
CREATE USER Creates a new user or replaces an existing user in the system. User & Security DDL
CREATE VIEW Creates a new view in the current/specified schema, based on a query of one or more existing tables (or any other valid query expression). Table, View, & Sequence DDL
CREATE WAREHOUSE Creates a new virtual warehouse in the system. Warehouse & Resource Monitor DDL
DELETE Remove data from a table using an optional WHERE clause and/or additional tables. DML Commands (by Category)
DESCRIBE <object> Describes the details for the specified object. DDL Commands (by Category)
DESCRIBE FILE FORMAT Describes the properties and their current values for a file format, as well as the default values for each property. Data Loading / Unloading DDL
DESCRIBE FUNCTION Describes the specified UDF, including the UDF signature (i.e. arguments), return value, language, and body (i.e. definition). UDF (User-Defined Function) DDL
DESCRIBE MATERIALIZED VIEW Describes the columns in a materialized view. Table, View, & Sequence DDL
DESCRIBE NETWORK POLICY Describes the properties specified for a network policy. User & Security DDL
DESCRIBE PIPE Describes the properties specified for a pipe, as well as the default values of the properties. Data Loading / Unloading DDL
DESCRIBE RESULT Describes the columns in the result of a query you executed (within 24 hours of when you executed the query). Account & Session DDL
DESCRIBE SHARE Describes the data objects that are included in a share. Database, Schema, & Share DDL
DESCRIBE STAGE Describes the values specified for the properties in a stage (file format, copy, and location), as well as the default values for each property. Data Loading / Unloading DDL
DESCRIBE TABLE Describes either the columns in a table or the current values, as well as the default values, for the stage properties for a table. Table, View, & Sequence DDL
DESCRIBE USER Describes a user, including the current values for the user’s properties, as well as the default values. User & Security DDL
DESCRIBE VIEW Describes the columns in a view (or table). Table, View, & Sequence DDL
DROP <object> Removes the specified object from the system. DDL Commands (by Category)
DROP DATABASE Removes a database from the system. Database, Schema, & Share DDL
DROP FILE FORMAT Removes the specified file format from the current/specified schema. Data Loading / Unloading DDL
DROP FUNCTION Removes the specified user-defined function (UDF) from the current/specified schema. UDF (User-Defined Function) DDL
DROP MANAGED ACCOUNT Removes a managed account, including all objects created in the account, and immediately restricts access to the account. Account & Session DDL
DROP MATERIALIZED VIEW Removes the specified materialized view from the current/specified schema. UDF (User-Defined Function) DDL
DROP NETWORK POLICY Removes the specified network policy from the system. User & Security DDL
DROP PIPE Removes the specified pipe from the current/specified schema. Data Loading / Unloading DDL
DROP RESOURCE MONITOR Removes the specified resource monitor from the system. Warehouse & Resource Monitor DDL
DROP ROLE Removes the specified role from the system. User & Security DDL
DROP SCHEMA Removes a schema from the current/specified database. Database, Schema, & Share DDL
DROP SHARE Removes the specified share from the system and immediately revokes access for all consumers (i.e. accounts who have created a database from the share). Database, Schema, & Share DDL
DROP STAGE Removes the specified named internal or external stage from the current/specified schema. Data Loading / Unloading DDL
DROP TABLE Removes a table from the current/specified schema, but retains a version of the table so that it can be recovered using UNDROP TABLE. Table, View, & Sequence DDL
DROP USER Removes the specified user from the system. User & Security DDL
DROP VIEW Removes the specified view from the current/specified schema. Table, View, & Sequence DDL
DROP WAREHOUSE Removes the specified virtual warehouse from the system. Warehouse & Resource Monitor DDL
GET Downloads data files from one of the following Snowflake stages to a local directory/folder on a client machine. DML Commands (by Category)
GRANT OWNERSHIP Transfers ownership of an object (or all objects of a specified type in a schema) from one role to another role. User & Security DDL
GRANT <privileges> … TO ROLE Grants one or more access privileges on a securable object to a role. User & Security DDL
GRANT <privilege> … TO SHARE Grants access privileges for databases and other supported database objects (schemas, tables, and views) to a share. User & Security DDL
GRANT ROLE Assigns a role to a user or another role. User & Security DDL
INSERT Updates a table by inserting one or more rows into the table. DML Commands (by Category)
INSERT (multi-table) Updates multiple tables by inserting one or more rows with column values (from a query) into the tables. DML Commands (by Category)
LIST Returns a list of files that have been staged (i.e. uploaded from a local file system or unloaded from a table) in one of the following Snowflake stages. DML Commands (by Category)
MERGE Inserts, updates, and deletes values in a table based on values in a second table or a subquery. DML Commands (by Category)
PUT Uploads (i.e. stages) data files from a local directory/folder on a client machine to one of the following Snowflake stages. DML Commands (by Category)
REMOVE Removes files that have been staged (i.e. uploaded from a local file system or unloaded from a table) in one of the following Snowflake internal stages. DML Commands (by Category)
REVOKE <privileges> … FROM ROLE Removes one or more privileges on a securable object from a role. User & Security DDL
REVOKE <privilege> … FROM SHARE Revokes access privileges for databases and other supported database objects (schemas, tables, and views) from a share. User & Security DDL
REVOKE ROLE Removes a role from another role or a user. User & Security DDL
ROLLBACK Rolls back an open transaction in the current session. Transactions
SELECT SELECT can be used in both a statement and a clause within a SELECT statement. Query Syntax
SET Initializes the value of a session variable to the result of a SQL expression. Account & Session DDL
SHOW <objects> Lists the existing objects for the specified object type. DDL Commands (by Category)
SHOW COLUMNS Lists the columns in the tables or views for which you have access privileges. Table, View, & Sequence DDL
SHOW DATABASES Lists the databases for which you have access privileges across your entire account, including dropped databases that are still within the Time Travel retention period and, therefore, can be undropped. Database, Schema, & Share DDL
SHOW FILE FORMATS Lists the file formats for which you have access privileges. Data Loading / Unloading DDL
SHOW FUNCTIONS Lists all the native (i.e. system-defined/built-in) scalar functions provided by Snowflake, as well as any UDFs that have been created for your account. Account & Session DDL
SHOW GRANTS Lists all access control privileges that have been granted to roles, users, and shares. User & Security DDL
SHOW LOCKS Lists all running transactions that have locks on resources. Transactions
SHOW MANAGED ACCOUNTS Lists the managed accounts created for your account. Account & Session DDL
SHOW MATERIALIZED VIEWS Lists the materialized views that you have privileges to access. Account & Session DDL
SHOW NETWORK POLICIES Lists all network policies defined in the system. User & Security DDL
SHOW OBJECTS Lists the tables and views for which you have access privileges. Table, View, & Sequence DDL
SHOW PARAMETERS Lists all the account, session, and object parameters that can be set, as well as the current and default values for each parameter. Account & Session DDL
SHOW PIPES Lists the pipes for which you have access privileges. Data Loading / Unloading DDL
SHOW RESOURCE MONITORS Lists all the resource monitors in your account for which you have access privileges. Warehouse & Resource Monitor DDL
SHOW ROLES Lists all the roles for which you have access privileges across your entire account, including the system-defined roles and any custom roles that have been created. User & Security DDL
SHOW SCHEMAS Lists the schemas for which you have access privileges, including dropped schemas that are still within the Time Travel retention period and, therefore, can be undropped. Database, Schema, & Share DDL
SHOW SEQUENCES Lists all the sequences for which you have access privileges. Table, View, & Sequence DDL
SHOW SHARES Lists all shares available in the system. Database, Schema, & Share DDL
SHOW STAGES Lists all the stages for which you have access privileges. Data Loading / Unloading DDL
SHOW TABLES Lists the tables for which you have access privileges, including dropped tables that are still within the Time Travel retention period and, therefore, can be undropped. Table, View, & Sequence DDL
SHOW TRANSACTIONS List all running transactions. Transactions
SHOW USER FUNCTIONS Lists all user-defined functions (UDFs) for which you have access privileges. UDF (User-Defined Function) DDL
SHOW USERS Lists all users in the system. User & Security DDL
SHOW VARIABLES Lists all variables defined in the current session. Account & Session DDL
SHOW VIEWS Lists the views, including secure views, for which you have access privileges. Table, View, & Sequence DDL
SHOW WAREHOUSES Lists all the warehouses in your account for which you have access privileges. Warehouse & Resource Monitor DDL
TRUNCATE MATERIALIZED VIEW Removes all rows from a materialized view, but leaves the view intact (including all privileges and constraints on the materialized view). Table, View, & Sequence DDL
TRUNCATE TABLE Removes all rows from a table, but leaves the table intact (including all privileges and constraints on the table). DML Commands (by Category)
UNDROP DATABASE Restores the most recent version of a dropped database. Database, Schema, & Share DDL
UNDROP SCHEMA Restore the most recent version of a dropped schema. Database, Schema, & Share DDL
UNDROP TABLE Restores the most recent version of a dropped table. Table, View, & Sequence DDL
UNSET Drops a session variable. Account & Session DDL
UPDATE Updates specified rows in the target table with new values. DML Commands (by Category)
USE <object> Specifies the role, warehouse, database, or schema to use for the current session. DDL Commands (by Category)
USE DATABASE Specifies the active/current database for the session. Database, Schema, & Share DDL
USE ROLE Specifies the active/current role for the session. User & Security DDL
USE SCHEMA Specifies the active/current schema for the session. Database, Schema, & Share DDL
USE WAREHOUSE Specifies the active/current warehouse for the session. Warehouse & Resource Monitor DDL