Sql, Data, Data Science, Database, Data Visualization.
ALTER SCHEMA staging TRANSFER swap.table2; For a transactional database system like SQL Server, it is recommended to put all this logic into a transaction to make it even more robust: BEGIN TRANSACTION [Swap] BEGIN TRY --step 2 of swap logic ALTER SCHEMA swap TRANSFER live.table1; ALTER SCHEMA swap