Help Center/
Data Lake Insight/
SQL Syntax Reference (Kuala Lumpur Region)/
Spark SQL Syntax Reference/
Data Permissions Management/
Creating a Role
Updated on 2023-03-06 GMT+08:00
Creating a Role
Function
- This statement is used to create a role in the current database or a specified database.
- Only users with the CREATE_ROLE permission on the database can create roles. For example, the administrator, database owner, and other users with the CREATE_ROLE permission.
- Each role must belong to only one database.
Syntax
1
|
CREATE ROLE [db_name].role_name; |
Keyword
None
Precautions
- The role_name to be created must not exist in the current database or the specified database. Otherwise, an error will be reported.
- If db_name is not specified, the role is created in the current database.
Example
1
|
CREATE ROLE role1; |
Parent topic: Data Permissions Management
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot