CREATE SCHEMA Syntax

Schemas are a concept that was introduced in SQL Server 2005 that replaced object owners. Schemas are methods used to abstract objects into separate categories in order to simplify permissions and help categorization and organization.

To create a schema, simply do the following:

[cc lang=”sql”]
CREATE SCHEMA app AUTHORIZATION dbo
[/cc]

The app represents the name of the schema and the dbo represents the owner of the schema. Users, groups, or roles can be specified as owners.

I personally like to use schemas in order to automatically grant permissions to a group or user. All you have to do is assign specific permissions a user has to a schema then any object you create under that schema, will allow the user that particular permission. This is better than explicitly specifying permissions to every object created.

One comment
soualm 04 Nov 2018 at 12:01 pm

calculer le nombre d’année; le nombre de moins et le nombre de jours entre 2 date
c-a-d fonction qui revoit le nombre d’année; le nombre de moins et le nombre de jours entre 2 date en sql server

Featured Articles

 Site Author

  • Thanks for visiting!
css.php