if exists ( select * from sysdatabases where name='databaseName' ) drop database databaseName go Create DATABASE databasename