All Products
Search
Document Center

PolarDB:Create a user

Last Updated:Mar 28, 2026

CREATE USER creates a new user account in a PolarDB for PostgreSQL (Compatible with Oracle) database cluster. When the statement runs, PolarDB automatically creates a schema with the same name as the user; that schema is owned by the new user.

Prerequisites

Only a privileged account can run CREATE USER. To create a privileged account, see Create an account.

Syntax

CREATE USER name [IDENTIFIED BY password]

Parameters

ParameterDescription
nameThe name of the user. Must start with a lowercase letter. Can contain lowercase letters, digits, and underscores (_).
passwordThe password for the user. Must start with a lowercase letter. Can contain lowercase letters, digits, and underscores (_).
Note Both name and password must be 1–63 characters in length.

Example

Create a user named user with the password password:

CREATE USER user IDENTIFIED BY password;

The statement creates a standard account. For the permissions granted to standard accounts, see Account permissions.

See also