20 October 2018        Add to Favorites   Report

Rename a table in Snowflake

Snowflake offers the user the flexibility to rename a table in the database. You will need to have "create table" access to do this operation. 


Renames the specified table with a new identifier that is not currently used by any other tables in the schema

ALTER TABLE [ IF EXISTS ] <name> SWAP WITH <target_table_name>

Swaps all content and metadata between two specified tables, including any integrity constraints defined for the tables. Also, swap all access control privilege grants. The two tables are essentially renamed in a single transaction

Read great educational content like this and a lot more !

Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too