Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.3.0 |  CUBRID 8.3.1 |  CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 

Managing User

Description

DBA and DBA members can create, drop and alter users by using SQL statements.

Syntax

CREATE USER user_name

[ PASSWORD password ]

[ GROUPS user_name [ {, user_name } ... ] ]

[ MEMBERS user_name [ {, user_name } ... ] ] ;

DROP_USER user_name;

ALTER_USER user_name PASSWORD password;

  • user_name : Specifies the user name to create, delete or change.
  • password : Specifies the user password to create or change.
Example 1

The following is an example in which the user Fred is created, the password is changed, and then the user Fred is deleted.

CREATE USER Fred;

ALTER USER Fred PASSWORD '1234';

DROP USER Fred;

Example 2

The following is an example in which a user is created and then members are added to the user. By the following statement, company becomes a group that has engineering, marketing and design as its members. marketing becomes a group with members smith and jones, design becomes a group with a member smith, and engineering becomes a group with a member brown.

CREATE USER company;

CREATE USER engineering GROUPS company;

CREATE USER marketing GROUPS company;

CREATE USER design GROUPS company;

CREATE USER smith GROUPS design, marketing;

CREATE USER jones GROUPS marketing;  

CREATE USER brown GROUPS engineering;

Example 3

The following example creates the same groups as above, but uses the MEMBERS keyword instead of GROUPS.

CREATE USER smith;

CREATE USER brown;

CREATE USER jones;

CREATE USER engineering MEMBERS brown;

CREATE USER marketing MEMBERS smith, jones;

CREATE USER design MEMBERS smith;

CREATE USER company MEMBERS engineering, marketing, design;