- Code:
USE master;
ALTER DATABASE dbname
SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE dbname;
Aaron Bertrand♦
Source: dba.stackexchange.com
More: microsoft.com | dba
USE master;
ALTER DATABASE dbname
SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DROP DATABASE dbname;