Sunday, 17 August 2025

INSERT OVERWRITE

  • Specifies that the target table should be truncated before inserting the values into the table.
  • To use the OVERWRITE option on INSERT, you must use a role that has DELETE privilege on the table because OVERWRITE will delete the existing records in the table.
E.g.

INSERT OVERWRITE INTO table_name
  SELECT * FROM src_table_name
  WHERE city = 'abcd';

No comments:

Snowflake - Cost Optimization

Reduce auto-suspend to 60 seconds Reduce virtual warehouse size Ensure minimum clusters are set to 1 Consolidate warehouses Separate warehou...