Delete a Row from a Data Extension

Use the delete method on the DataExtensionObject object to delete a row from a data extension.

When you use the retrieve method to get a column that contains the Date data type, SOAP API returns a value that’s rounded to the nearest second, followed by AM or PM. This behavior occurs even when the source timestamp contains millisecond data. If you use a Date column as a primary key, it can prevent you from retrieving unique rows. Use caution when you delete rows that you obtained by using the retrieve method if the data extension those rows belong to uses a Date value as a primary key.

This sample SOAP envelope shows how to delete a row from a data extension. This example uses a specific value in a MemberId field to identify the row to delete.

If the row and value from the request is found in the data extension, the row is deleted. The response confirms which rows were deleted.