This is no longer maintained and has been superseded by datajoint-company/datajoint-docs. Please file new issues there (or help contribute!). We are currently migrating and generating new content until December 2022 after which we’ll be decomissioning and in favor of


The delete method deletes entities from a table and all dependent entries in dependent tables.

Delete is often used in conjunction with the restriction operator to define the subset of entities to delete. Delete is performed as an atomic transaction so that partial deletes never occur.


# delete all entries from tuning.VonMises

# delete entries from tuning.VonMises for mouse 1010
(tuning.VonMises & 'mouse=1010').delete()

# delete entries from tuning.VonMises except mouse 1010
(tuning.VonMises - 'mouse=1010').delete()

Deleting from part tables

Entities in a part table are usually removed as a consequence of deleting the master table.

To enforce this workflow, calling delete directly on a part table produces an error. In some cases, it may be necessary to override this behavior. To remove entities from a part table without calling delete master, use the argument force=True.

Talk to the Community