Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Giving error while creating schema

    USE [SampleDB]

    IF ((SELECT COUNT(*) FROM sys.schemas WHERE name = N'sampleSchema') = 0)

    BEGIN

    exec('CREATE SCHEMA [sampleSchema] AUTHORIZATION [dbo]')

    PRINT 'Schema Exists'

    END

    GO

    - Serves our purpose

Viewing post 1 (of 1 total)