All 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

A

ALTER <object>

Modifies the metadata of an account-level or database object, or the parameters for a session.

DDL Commands

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 EXTERNAL TABLE

Manually refreshes an existing external table.

Table, View, & Sequence 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) & Stored Procedure DDL

ALTER INTEGRATION

Modifies the properties for an existing integration.

DDL Commands

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 NOTIFICATION INTEGRATION

Modifies the properties for an existing notification integration.

User & Security DDL

ALTER PIPE

Modifies the properties for an existing pipe object.

Data Loading / Unloading DDL

ALTER PROCEDURE

Modifies the properties for an existing stored procedure.

UDF (User-Defined Function) & Stored Procedure 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 SECURITY INTEGRATION

Modifies the properties for an existing security integration.

User & Security 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 STORAGE INTEGRATION

Modifies the properties for an existing storage integration.

User & Security DDL

ALTER STREAM

Modifies the properties, columns, or constraints for an existing stream.

Table, View, & Sequence 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 one or more column properties for a table using an ALTER COLUMN clause in a ALTER TABLE statement.

Table, View, & Sequence DDL

ALTER TASK

Modifies the properties, columns, or constraints for an existing task.

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

B

BEGIN

Begins a transaction in the current session.

Transactions

C

CALL

Calls a stored procedure.

UDF (User-Defined Function) & Stored Procedure DDL

COMMENT

Adds a comment or overwrites an existing comment for an existing object.

DDL Commands

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

COPY INTO <table>

Loads data from staged files to an existing table.

DML Commands

CREATE <object>

Creates a new object of the specified type.

DDL Commands

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 EXTERNAL TABLE

Creates a new external table in the current/specified schema or replaces an existing external table.

Table, View, & Sequence 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) & Stored Procedure DDL

CREATE INTEGRATION

Creates a new integration in the system or replaces an existing integration.

DDL Commands

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 NOTIFICATION INTEGRATION

Creates a new notification integration in the account or replaces an existing integration.

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 PROCEDURE

Creates a new stored procedure.

UDF (User-Defined Function) & Stored Procedure 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 SECURITY INTEGRATION

Creates a new security integration in the account or replaces an existing integration.

User & Security 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 STORAGE INTEGRATION

Creates a new storage integration in the account or replaces an existing integration.

User & Security DDL

CREATE STREAM

Creates a new stream in the current/specified schema or replaces an existing stream.

Table, View, & Sequence 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 TASK

Creates a new task in the current/specified schema or replaces an existing task.

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

D

DELETE

Remove data from a table using an optional WHERE clause and/or additional tables.

DML Commands

DESCRIBE <object>

Describes the details for the specified object.

DDL Commands

DESCRIBE EXTERNAL TABLE

Describes the VALUE column and virtual columns in an external table.

Table, View, & Sequence DDL

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) & Stored Procedure DDL

DESCRIBE INTEGRATION

Describes the properties of an integration.

User & Security 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 PROCEDURE

Describes the specified stored procedure, including the stored procedure’s signature (i.e. arguments), return value, language, and body (i.e. definition).

UDF (User-Defined Function) & Stored Procedure 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 STREAM

Describes the columns in a stream.

Table, View, & Sequence 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 TASK

Describes the columns in a task.

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

DROP DATABASE

Removes a database from the system.

Database, Schema, & Share DDL

DROP EXTERNAL TABLE

Removes an external table from the current/specified schema.

Table, View, & Sequence 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) & Stored Procedure DDL

DROP INTEGRATION

Removes an integration from the current/specified schema.

User & Security 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) & Stored Procedure 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 PROCEDURE

Removes the specified stored procedure from the current/specified schema.

UDF (User-Defined Function) & Stored Procedure 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 STREAM

Removes an stream from the current/specified schema.

Table, View, & Sequence 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 TASK

Removes a task from the current/specified schema.

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

G

GET

Downloads data files from one of the following Snowflake stages to a local directory/folder on a client machine.

DML Commands

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

I

INSERT

Updates a table by inserting one or more rows into the table.

DML Commands

INSERT (multi-table)

Updates multiple tables by inserting one or more rows with column values (from a query) into the tables.

DML Commands

L

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

M

MERGE

Inserts, updates, and deletes values in a table based on values in a second table or a subquery.

DML Commands

P

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

R

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

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

S

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

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 DELEGATED AUTHORIZATIONS

Lists the active delegated authorizations for which you have access privileges.

User & Security DDL

SHOW EXTERNAL TABLES

Lists the external tables for which you have access privileges.

Table, View, & Sequence 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 INTEGRATIONS

Lists the integrations for which you have access privileges.

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.

Table, View, & Sequence 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 PROCEDURES

Lists the stored procedures that you have privileges to access.

UDF (User-Defined Function) & Stored Procedure 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 STREAMS

Lists the streams for which you have access privileges.

Table, View, & Sequence 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 TASKS

Lists the tasks for which you have access privileges.

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) & Stored Procedure 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

T

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

U

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

USE <object>

Specifies the role, warehouse, database, or schema to use for the current session.

DDL Commands

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