Creates a database user.

Syntax

CREATE USER name IDENTIFIED BY password

Description

When you execute the CREATE USER statement, PolarDB for Oracle creates a schema that uses the same name as the user. The schema is owned by the user.
Note
  • You can execute this statement by using only a privileged account.
  • The account created by executing this statement is a standard account.

Parameters

Parameter Description
name The name of the user.
Note
  • The name can contain lowercase letters, digits, and underscores (_).
  • The name must start with a lowercase letter.
  • The name must be 1 to 63 characters in length.
password The password of the user.
Note
  • The password can contain lowercase letters, digits, and underscores (_).
  • The password must start with a lowercase letter.
  • The password must be 1 to 63 characters in length.

Examples

Create a user named user and set the password to password.

CREATE USER user IDENTIFIED BY password;