Skip to content

Instantly share code, notes, and snippets.

@rheid
Created November 19, 2016 09:45
Show Gist options
  • Save rheid/a8f73b23e94f5f00e607a576dd470bce to your computer and use it in GitHub Desktop.
Save rheid/a8f73b23e94f5f00e607a576dd470bce to your computer and use it in GitHub Desktop.
Drop multiple databases in SQL Server
USE master;
Go
SELECT 'DROP DATABASE '+ name
FROM sys.databases WHERE name like 'sp16%';
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment