db del
Prev | Chapter 1. Berkeley DB Tcl APIs | Next

## db del

    db del
    	[-glob]
    	[-txn txnid]
    	key

The db del command removes key/data pairs from the database.

In the presence of duplicate key values, all records associated with the designated key will be discarded.

The options are as follows:

- -glob

  The specified key is a wildcard pattern, and all keys matching that pattern are discarded from the database. The pattern is a simple wildcard, any characters after the wildcard character are ignored. This option only works on databases using the Btree access method.

- -txn txnid

  If the operation is part of an application-specified transaction, the txnid parameter is a transaction handle returned from env txn. If no transaction handle is specified, but the operation occurs in a transactional database, the operation will be implicitly transaction protected.

The db del command returns 0 on success, and in the case of error, a Tcl error is thrown.

Prev | Up | Next
db cursor | Home | db get