Creates a database user or group.
CREATE USER user-name [ IDENTIFIED BY password ] [ LOGIN POLICY policy-name ] [ FORCE PASSWORD CHANGE { ON | OFF } ]
The name of the user you are creating.
The password of the user. A user without a password cannot connect to the database.
The name of the login policy to assign the user. If no login policy is specified, the DEFAULT login policy is applied.
Controls whether the user must specify a new password when they log in. This setting overrides the password_expiry_on_next_login option setting in the user's policy.
You do not have to specify a password for the user. A user without a password cannot connect to the database. This is useful if you are creating a group and do not want anyone to connect to the database using the group user ID. A user ID must be a valid identifier.
If you use this statement in a procedure, do not specify the password as a string literal because the definition of the procedure is visible in the SYSPROCEDURE system view. For security purposes, specify the password using a variable that is declared outside of the procedure definition.
You must have the MANAGE ANY USER system privilege.
None.
Not in the standard.
The following example creates a user named SQLTester with the password welcome. The SQLTester user will be required to specify a password when they log in.
CREATE USER SQLTester IDENTIFIED BY welcome FORCE PASSWORD CHANGE ON;