Delete

The del 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.

Examples

Delete the entire contents of the table tuning.VonMises and all its dependents:

% delete all entries from tuning.VonMises
del(tuning.VonMises)

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

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

Deleting from part tables

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

Note

This rule is currently not enforced in MATLAB, but calling del directly on a part table will produce an error in the future. See issue #193 on datajoint-matlab for more information.

Talk to the Community