In SQL, the command to revoke user operation permissions is REVOKE, and its syntax is as follows: REVOKE [GRANT OPTION FOR] <Permissions> ON
The command to revoke user operation permissions in SQL
In SQL, the command to revoke user operation permissions isREVOKE.
Use REVOKE command
REVOKE
The syntax of the command is as follows:
<code>REVOKE [GRANT OPTION FOR] <权限> ON <对象> FROM <用户></code>
Among them:
[GRANT OPTION FOR]
: Optional parameter, specifying whether to also recycle options for granting permissions. <Permissions>
: The permission to be reclaimed can be one of the following:
SELECT
INSERT
UPDATE
DELETE
CREATE
DROP
: The user whose permissions are to be revoked.
Example
The following example recycles useruser1's
SELECT on table
table1 Permissions:
<code class="sql">REVOKE SELECT ON table1 FROM user1;</code>The following example revokes all permissions from user
user2 to view
view1, including granting permissions:
<code class="sql">REVOKE ALL PRIVILEGES ON view1 FROM user2;</code>
Notes
command will only revoke the specified permissions. To reclaim all privileges, use
ALL PRIVILEGES.
The above is the detailed content of The command to reclaim user operation permissions in sql is. For more information, please follow other related articles on the PHP Chinese website!