schemas.sql 246 B

1234567
  1. if not exists(select s.schema_id from sys.schemas s where s.name = 'import')
  2. and exists(select p.principal_id from sys.database_principals p where p.name = 'dbo') begin
  3. exec sp_executesql N'create schema [import] authorization [dbo]'
  4. end
  5. GO