Created
March 14, 2019 03:31
-
-
Save lppier/f416c654493d3668b88898b73f677ea6 to your computer and use it in GitHub Desktop.
Useful SQL for table handling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Remove all backup tables | |
DROP TABLE IF EXISTS [WKBRZ].[dbo].[PredictionNetworkBookingPax_Backup]; | |
-- Create a backup | |
select * into [WKBRZ].[dbo].[PredictionNetworkBookingPax_Backup] from [WKBRZ].[dbo].[PredictionNetworkBookingPax] | |
-- Restore from the backup tables | |
INSERT INTO [WKBRZ].[dbo].[PredictionNetworkBookingPax] SELECT * FROM [WKBRZ].[dbo].[PredictionNetworkBookingPax_Backup] | |
-- Delete all prediction table contents | |
DELETE FROM [WKBRZ].[dbo].[PredictionNetworkBookingPax] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment