Removes the entry (such as one created with the CREATE USER or GRANT statement) for a user name or special user class from the database.
1 – Environment
You can use the DROP statement: o In interactive SQL o Embedded in host language programs o As part of a procedure in an SQL module or other compound statement o In dynamic SQL as a statement to be dynamically executed
2 – Format
(B)0[m[1;4mDROP[m[1m [1;4mUSER[m[1m qqqqq> <username>[m [1mqqwqwqqqqqqqqqqqqqqqwqwq> [m [1m x tq> [1;4mCASCADE[m[1m qqu x [m [1m x tq> [1;4mRESTRICT[m[1m qqu x [m [1mx[m [1mmq> [1;4mIF[m[1m [1;4mEXISTS[m[1m qqj[m [1mx[m [1mmqqqqqqqqqq<qqqqqqqqj[m
3 – Arguments
3.1 – CASCADE
The CASCADE clause drops the specified user from the database and deletes all references to this user that exist in the access control lists (ACLs), modules, and schemas. If the PUBLIC user is dropped, ACLs are not processed to remove the PUBLIC entry.
3.2 – RESTRICT
The RESTRICT clause drops the specified user. If there are any references to this user in another ACL, then the DROP USER statement fails. The RESTRICT clause is the default.
3.3 – username
An existing user name in the database.
4 – Example
Example 1: Dropping a User SQL> SHOW USER Users in database with filename mf_personnel.rdb JSMITH NSTUART SQL> DROP USER JSMITH; SQL> SHOW USER Users in database with filename mf_personnel.rdb NSTUART SQL>