Skip to content

Instantly share code, notes, and snippets.

@LyleScott
Created February 28, 2020 16:11
Show Gist options
  • Save LyleScott/e9ef47ecea98c7b8918d1ed74bf0abd4 to your computer and use it in GitHub Desktop.
Save LyleScott/e9ef47ecea98c7b8918d1ed74bf0abd4 to your computer and use it in GitHub Desktop.
Snowflake DELETE TABLE LIKE workaround
SELECT CONCAT('DROP TABLE ', table_name, ' ;')
FROM your_database_name.information_schema.tables
WHERE table_name like '%_STAGING';
-- 1) Then, click “COPY” to get the TSV results.
-- 2) Paste all those commands to a Snowflake worksheet
-- 3) Review carefully
-- 4) Select all DELETE queries and execute the query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment