Security3:create Schema

Source: Internet
Author: User

Creates a schema in the current database

The new schema is owned by one of the following Database-level principals:database user, database role, or application ro Le. Objects created within a schema is owned by the owner of the schema, and has a NULL principal_id in sys.obj ECTS. Ownership of Schema-contained objects can be transferred to any Database-level principal, but the schema owner always Reta INS CONTROL permission on objects within the schema.

Syntax

CREATE SCHEMA  <schema_name_clause> ::={schema_name| AUTHORIZATION Owner_name}

AUTHORIZATION owner_name

Specifies the name of the Database-level principal that would own the schema. This principal may own other schemas, and could not be the use of the current schema as its default schema.


1,example

CREATELOGIN Testloginname withPassword='j345#$) THB', Default_database=Db_studyGoCREATE USERTestusername forLOGIN Testloginname withDefault_schema=Test;GoCREATE SCHEMATestAUTHORIZATIONTestusername;GoCreate Tabletest.dt_test (IDint, Codeint);Go

Security3:create Schema

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.