Name

USER_DROP — This deletes a user ccount, optionally including schema objects, DAV resources and other possible resources owned by the user.

Synopsis

USER_DROP ( in name varchar ,
  in cascade integer );
 

Description

This is used to remove an existing user account from local security schema.

Parameters

name

A string containing the name of the user account to be deleted.

cascade

This flag (0/1) specifies whether to delete the stored procedures/functions, PL modules, tables and user defined types owned by the user. It cannot drop assembly definitions (created with CREATE ASSEMBLY), because CREATE ASSEMBLY is a database wide operation (done by the DBA group) so the assembly has no owner (since you can not drop DBA). The default value is zero. Sometimes it is not possible to drop the resources, for example if a table owned by the user is referenced by foreign key in a table that would not be dropped. The drop user will detect that and will print the appropriate error message (giving up the operation).

Return Types

None