Only creating a schema, when it does not exist in a Microsoft SQL Server database.
If you want to create a schema in a Microsoft SQL Server database only when it does not exist, use: declare @SchemaName nvarchar(128) set @SchemaName = 'Staging' if not exists(select top 1 1 from information_schema.schemata