SQL Server Data Control statement (DCL)

Source: Internet
Author: User

The DCL control statement is used to set permissions for changing users or roles.

  • Grant Permission Action--grant
    The SQL Server server controls user access to the database through the Sign Language permission table. After adding a new user to the database, if you do not enjoy the extra action, the user only chauxn the system tables and does not have any permissions to manipulate the database objects. The GRANT statement can grant permission to manipulate database objects, including tables, views, stored procedures, aggregate functions, and so on. The permissions allowed to execute include: query, update, delete, etc.
    Example: authorizing a user named guest to perform update and delete operations on the Stu_info table
    GRANT Update,delete on Stu_info
    To guest with GRANT OPTION
    Note: With GRANT option means that the user can also grant other users the permissions they own.
  • Deny permission action--deny
    Example: Prohibit user named guest to update permissions on Stu_info table operations
    DENY UPDATE on Stu_info to guest CASCADE
  • Revoke permissions Operation--revoke
    Example: Recovering a Guest user's delete permission to Stu_info
    REVOKE DELETE on Stu_info from guest

SQL Server Data Control statement (DCL)

Related Article

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.