CREATE USER
Go Up to Statement and Function Reference (Language Reference Guide)
Create a new user. Available in DSQL
and isql
.
CREATE USER <name> SET
[PASSWORD <password>]
[[NO] DEFAULT ROLE <name>]
[[NO] SYSTEM USER NAME <name>]
[[NO] GROUP NAME <name>]
[[NO] UID <number>]
[[NO] GID <number>]
[[NO] DESCRIPTION <string>]
[[NO] FIRST NAME <string>]
[[NO] MIDDLE NAME <string>]
[[NO] LAST NAME <string>]
[ACTIVE]
[INACTIVE];
Argument | Description |
---|---|
|
Password of user |
|
Default role |
|
System user name for target user |
|
Group name for target user |
|
Target user ID |
|
Group ID for target user |
|
Description |
|
First name for target user |
|
Middle name for target user |
|
Last name for target user |
|
Default. After inactive, reinstates selected user. |
INACTIVE |
Prevents a user from logging into database. |
Description: CREATE USER creates a new user. Only used with database under embedded user authentication.
If you choose to set more than one property value for the user, include a comma between each property value pair.
- Note: When NO is specified, an argument to the option must not be supplied. NO sets the option to a NULL state.
Examples: The following statement creates the user, JDOE and set password, jdoe:
CREATE USER JDOE SET PASSWORD ‘jdoe’;
The next statement creates the user, JDOE, and set password, first name and last name:
CREATE USER JDOE SET PASSWORD ‘jdoe’, FIRST NAME ‘Jane’, LAST NAME ‘Doe’;