Creates a database user for PolarDB for PostgreSQL (Compatible with Oracle).
Syntax
CREATE USER name [IDENTIFIED BY password]Parameters
| Parameter | Description |
name | The name of the new user. Note
|
password | The password of the new user. Note
|
Description
When you run the CREATE USER statement, PolarDB for PostgreSQL (Compatible with Oracle) also creates a schema with the same name as the username. The new user owns that schema.
Note
- Only a privileged account can run this statement. To create a privileged account, see Create an account.
- The account created by this statement is a standard account. For the permissions of standard accounts, see Account permissions.
Examples
Create a user named "user" with the password "password".
CREATE USER user IDENTIFIED BY password;