Skip to content

DeleteAll

Marks all records in the data table as deleted.

1
myDataTable.DeleteAll():DataTable

Returns

The current DataTable instance.

Remarks

Rows in the table are not instantly deleted. To delete them persistently, you need to call the DataTable.Save method.

Delete all rows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var table = $Database.Get({
    Parameters : {
        TargetSchema : 'HR',
        TargetTable : 'Customers'
    }
});

table.DeleteAll();

table.Save();

See Also