Tassisto
Tassisto

Reputation: 10345

How to create a SQL Schema in a Query?

How can I create a sql schema in a Query? I'm using MS SQL Server Management Studio (SQL Server 2008).

Upvotes: 0

Views: 890

Answers (3)

jmarkmurphy
jmarkmurphy

Reputation: 11473

If you want to validate the schema before creating it, there is important information in this answer: https://stackoverflow.com/a/18712751/2296441

Upvotes: 0

Kenneth M. Nielsen
Kenneth M. Nielsen

Reputation: 487

Just like this.

USE [Sandbox]
GO

/****** Object:  Schema [MySchema]    Script Date: 08-05-2013 11:23:16 ******/
CREATE SCHEMA [MySchema]
GO

Upvotes: 3

Related Questions