Drop in use SQL Server database

Published:
ALTER DATABASE name SET single_user WITH ROLLBACK immediate;
DROP DATABASE name;