- Reference >
- Database Commands >
- Role Management Commands >
- dropRole
dropRole¶
On this page
Definition¶
-
dropRole¶ Deletes a user-defined role from the database on which you run the command.
The
dropRolecommand uses the following syntax:The
dropRolecommand has the following fields:Field Type Description dropRolestring The name of the user-defined role to remove from the database. writeConcerndocument Optional. The level of write concern for the removal operation. The writeConcerndocument takes the same fields as thegetLastErrorcommand.
Example¶
The following operations remove the readPrices role from the
products database: