AMPscript Data Extension Functions
Use the AMPscript Data Extension functions to manage data extensions and marketing objects and work with the data that they contain.
This table lists all of the AMPscript functions related to managing data extensions. The value in the Engagement column indicates whether Marketing Cloud Engagement supports the function. The value in the Next column indicates whether Marketing Cloud Next supports the function.
| Function Name | Description | Engagement | Next |
|---|---|---|---|
| ClaimRow() | Returns the first unclaimed row from a data extension. | ✅ Yes | ❌ No |
| ClaimRowValue() | Searches a data extension for an unclaimed row and returns a value from that row. | ✅ Yes | ❌ No |
| DataExtensionRowCount() | Returns the number of rows in a data extension. | ✅ Yes | ❌ No |
| DeleteData() | Deletes rows from a data extension in CloudPages, microsites, landing pages, and SMS messages. | ✅ Yes | ❌ No |
| DeleteDE() | Deletes rows from a data extension in an email. | ✅ Yes | ❌ No |
| ExecuteFilter() | Executes a data filter and returns an unordered rowset that contains the results. | ✅ Yes | ❌ No |
| ExecuteFilterOrderedRows() | Executes a data filter and returns an ordered rowset that contains the results. | ✅ Yes | ❌ No |
| InsertData() | Inserts rows into a data extension in CloudPages, microsites, landing pages, and SMS messages. | ✅ Yes | ❌ No |
| InsertDE() | Inserts rows into a data extension in emails. | ✅ Yes | ❌ No |
| Field() | Returns a specific field from a data row or record. | ✅ Yes | ✅ Yes |
| Lookup() | Returns a value from a data extension or marketing object. | ✅ Yes | ✅ Yes |
| LookupOrderedRows() | Returns rows from a data extension sorted in ascending or descending order (case-insensitive). | ✅ Yes | ❌ No |
| LookupOrderedRowsCS() | Returns rows from a data extension sorted in ascending or descending order (case-sensitive). | ✅ Yes | ❌ No |
| LookupRows() | Returns an unordered rowset from a data extension (case-insensitive). | ✅ Yes | ❌ No |
| LookupRowsCS() | Returns an unordered rowset from a data extension (case-sensitive). | ✅ Yes | ❌ No |
| Row() | Returns a row from a rowset, array, or object. | ✅ Yes | ✅ Yes |
| RowCount() | Returns the number of rows in a rowset, array, or object. | ✅ Yes | ✅ Yes |
| UpdateData() | Updates data in a data extension in CloudPages, microsites, landing pages, and SMS messages. | ✅ Yes | ❌ No |
| UpdateDE() | Updates data in a data extension in emails. | ✅ Yes | ❌ No |
| UpsertData() | Upserts data in a data extension in CloudPages, microsites, landing pages, and SMS messages. | ✅ Yes | ❌ No |
| UpsertDE() | Upserts data in a data extension in emails. | ✅ Yes | ❌ No |