HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

DCL Syntax Overview

Data control language (DCL) is used to create users and roles and set or modify database users or role rights.

SHOW

MogDB can use the SHOW command to display various object information. For details about related SQL statements, see Table 1.

Table 1 SQL statements related to SHOW

Function SQL Statement
Display index information. SHOW INDEX
Query the information about the current external connection (or internal thread). SHOW PROCESSLIST
Display the statement for creating a table. SHOW-CREATE-TABLE
Display the statement for creating a function. SHOW CREATE FUNCTION
Display the statement for creating a stored procedure. SHOW CREATE PROCEDURE
Display the statement for creating a database. SHOW CREATE DATABASE
Display the statement for creating a trigger. SHOW CREATE TRIGGER
Display the statement for creating a view. SHOW CREATE VIEW
Query GUC parameters. SHOW-VARIABLES
Display the user permission information in MogDB. SHOW GRANTS
Display information about storage functions. SHOW FUNCTION STATUS
Display the information about the stored procedure. SHOW PROCEDURE STATUS
Display information about the trigger. SHOW TIRRGER
Display the information about the supported character sets. SHOW CHARACTER SET, SHOW CHARSET
Display the information about the supported character sequence. SHOW COLLATION

GRANT

The MogDB allows you to run the GRANT command to grant various permissions. For details about related SQL statements, see Table 2.

Table 2 SQL statements related to GRANT

Function SQL Statement
Grant the permission to create indexes. GRANT INDEX
Grant the permission to modify functions and procedures. GRANT ALTER ROUTINE
Grant the permission to create functions and procedures. GRANT CREATE ROUTINE
Grant the permission to create temporary tables. GRANT CREATE TEMPORARY TABLES
Grant the permission to the current user to create a user. GRANT CREATE USER
Grant the permission to create tablespaces. GRANT CREATE TABLESPACE
Grant the proxy permission. GRANT PROXY

REVOKE

MogDB allows you to run the REVOKE command to revoke various permissions. For details about related SQL statements, see Table 3.

Table 3 SQL statements related to REVOKE

Function SQL Statement
Grant the permission to create indexes. REVOKE INDEX
Grant the permission to modify functions and procedures. REVOKE ALTER ROUTINE
Grant the permission to create functions and procedures. REVOKE CREATE ROUTINE
Grant the permission to create temporary tables. REVOKE CREATE TEMPORARY TABLES
Grant the permission to the current user to create a user. REVOKE CREATE USER
Grant the permission to create tablespaces. REVOKE CREATE TABLESPACE
Revoke the proxy permission. REVOKE PROXY

KILL

MogDB allows you to run the KILL command to terminate a specified connection or SQL statements executed under the connection. The following table lists the related SQL statements.

Table 4 SQL statements related to KILL

Function SQL Statement
Terminate a specified connection or an SQL statement executed under the connection. KILL

SET PASSWORD

MogDB allows you to run the SET PASSWORD command to change the user password. The following table lists the related SQL statements.

Table 5 SQL statements related to SET PASSWORD

Function SQL Statement
Change the user password. SET PASSWORD
Copyright © 2011-2024 www.enmotech.com All rights reserved.