<a id="flink-sql-insert-values-statement"></a>

# INSERT VALUES Statement in Confluent Cloud for Apache Flink

Confluent Cloud for Apache Flink® enables inserting data directly into a Flink SQL table.

## Syntax

```sql
[EXECUTE] INSERT { INTO | OVERWRITE } [catalog_name.][database_name.]table_name VALUES
  (value1 [, value2, ...])
  [, (value3 [, value4, ...])]
```

## Description

Insert data into a table.

Use the INSERT VALUES statement to insert one or more rows into a table by
specifying the value for each column.

For example, the following statement inserts a single row into a table named
`orders` that has four columns.

```sql
INSERT INTO orders VALUES (1, 1001, '2023-02-24', 50.0);
```

You can insert multiple rows by using a comma-separated list of values.

```sql
INSERT INTO orders VALUES
  (1, 1001, '2023-02-24', 50.0),
  (2, 1002, '2023-02-25', 60.0),
  (3, 1003, '2023-02-26', 70.0);
```

## Example

In the Flink SQL shell or in a Cloud Console workspace, run the
following commands to see an example of the INSERT VALUES statement.

1. Create a users table.
   ```sql
   -- Create a users table.
   CREATE TABLE users (
     user_id STRING,
     registertime BIGINT,
     gender STRING,
     regionid STRING
   );
   ```
2. Insert rows into the `users` table.
   ```sql
   -- Populate the table with mock users data.
   INSERT INTO users VALUES
     ('Thomas A. Anderson', 1677260724, 'male', 'Region_4'),
     ('Trinity', 1677260733, 'female', 'Region_4'),
     ('Morpheus', 1677260742, 'male', 'Region_8'),
     ('Dozer', 1677260823, 'male', 'Region_1'),
     ('Agent Smith', 1677260955, 'male', 'Region_0'),
     ('Persephone', 1677260901, 'female', 'Region_2'),
     ('Niobe', 1677260921, 'female', 'Region_3'),
     ('Zee', 1677260922, 'female', 'Region_5');
   ```
3. Inspect the inserted rows.
   ```sql
   SELECT * FROM users;
   ```

   Your output should resemble:
   ```none
   user_id            registertime gender regionid
   Thomas A. Anderson 1677260724   male   Region_4
   Trinity            1677260733   female Region_4
   Morpheus           1677260742   male   Region_8
   Dozer              1677260823   male   Region_1
   Agent Smith        1677260955   male   Region_0
   Persephone         1677260901   female Region_2
   Niobe              1677260921   female Region_3
   Zee                1677260922   female Region_5
   ```

## Related content

- [INSERT INTO FROM SELECT](insert-into-from-select.md#flink-sql-insert-into-from-select-statement)
- [Flink SQL Queries](overview.md#flink-sql-queries)
- [Flink SQL Functions](../functions/overview.md#flink-sql-functions-overview)
- [Statements](../statements/overview.md#flink-sql-statements-overview)

#### NOTE
This website includes content developed at the [Apache Software Foundation](https://www.apache.org/)
under the terms of the [Apache License v2](https://www.apache.org/licenses/LICENSE-2.0.html).
