Retrieves a rowset from a data extension.

This function returns a maximum of 2,000 rows. To specify the number of rows returned and the order that rows are returned in, use the LookupOrderedRows() function instead.

LookupRows(1, 2, 3)

1stringRequired. The name of the data extension.
2string or arrayRequired. The name of the column that contains the data to look up. To specify multiple column names, place the column names in an array. When you specify multiple column names, they’re connected using AND logic.
3string or arrayRequired. The value to look up in the specified column. To specify multiple values, place the values in an array. If you specify an array for ordinal 2, you must specify an array of equal length for this ordinal.

To use the function, specify the name of the data extension, the column that contains the data that you want to retrieve and the value to search for in the specified column.

These examples reference a data extension that contains the customer data listed in this table.


This example retrieves the value of the PreferredLanguage column for the row in which the value of the ExternalId column is 'e67e755d-d2b9-4a0e-8103-eee7958ef257'.

The function outputs English.

You can also specify multiple values for the column name or the value by placing the values in an array. Multiple values are connected using AND logic. This example retrieves the names of customers whose PreferredLanguage is English and whose RewardsTier is Gold.

The function outputs the name of the only customer who meets both criteria: Mindy Lee.