USE master;
GO

IF EXISTS (SELECT name FROM sys.databases WHERE name = 'bazy_danych')
BEGIN
    ALTER DATABASE bazy_danych SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
    DROP DATABASE bazy_danych;
END
GO
