---
schema_version: "1"
id: ee6068b37ef096bca51f1c047fff03e6667a8210d10fc628955a97247bcf7496
title: InsertDE()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/data-extension/mc-ampscript-reference-data-extension-insert-de.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-insert-de.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4fe687b9a39f91c0f1c15cd82129b295226e799cc4cc6c487b64db19fe8c5f1b
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# InsertDE()

Inserts rows into a data extension. This function doesn’t return any output.

You can use this function to insert data into a data extension from emails. Use the `InsertData()` function to insert data from CloudPages, landing pages, microsites, and SMS messages in MobileConnect.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
InsertDE(dataExt,
         columnName1, valueToInsert1,
         [columnName2, valueToInsert2 ...])
```

The `InsertDE()` function has three parameters:

- `dataExt` (string): Required. The name of the data extension that you want to insert data into.
- `columnName1` (string): Required. The name of the column to insert into the data extension.
- `valueToInsert1` (string): Required. The value to insert into the specified column.

You can insert multiple columns of data into a row by appending column names and field values to the end of the function.

## Usage

To use the function, first pass it the name of the data extension that you want to insert data into. Next, pass it the name of the column to insert data into. Finally, pass the data that you want to insert into the specified column.

Imagine you have a Flights data extension that contains the data in this table.

| FlightId | Origin | Dest | Price | PerBagSurcharge |
| -------- | ------ | ---- | ----- | --------------- |
| 1        | IND    | NYC  | 100   |                 |
| 2        | IND    | LAX  | 200   |                 |
| 3        | IND    | SEA  | 500   | 25              |

To insert a new row, use this function.

```
%%[
  InsertDE("Flights", "FlightId", 4, "Origin", "IND", "Dest", "ORD", "Price", "125", "PerBagSurcharge", null)
]%%
```

The function inserts the specified row. The data extension now contains this data.

| FlightId | Origin | Dest | Price | PerBagSurcharge |
| -------- | ------ | ---- | ----- | --------------- |
| 1        | IND    | NYC  | 100   |                 |
| 2        | IND    | LAX  | 200   |                 |
| 3        | IND    | SEA  | 500   | 25              |
| 4        | IND    | ORD  | 125   |                 |

## See Also

- [InsertData()](https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-insert-data.md)
