IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = 'LOY_KF2') DROP DATABASE LOY_KF2 GO