# VALUES

**Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

`VALUES` retrieves a set of rows hardcoded in the SQL query. You can use `VALUES` to provide a set of constant rows as a subquery in a larger
[`SELECT` query](/docs/data/data-cloud-query-guide/references/dc-sql-reference/select.md). You can use `VALUES` as a top-level command or as a space-saving syntax variant in parts of complex queries.

Only these operators and clauses are supported.

- [UNION, INTERSECT, EXCEPT](/docs/data/data-cloud-query-guide/references/dc-sql-reference/select-union.md)
- [ORDER BY](/docs/data/data-cloud-query-guide/references/dc-sql-reference/select-order.md)
- [LIMIT, OFFSET, and FETCH](/docs/data/data-cloud-query-guide/references/dc-sql-reference/select-limit-offset.md) clauses can be used with TABLE.

`VALUES` doesn’t support the WHERE clause and aggregation. For more information on clauses and operations, see [Clauses](/docs/data/data-cloud-query-guide/references/dc-sql-reference/select.md#clauses).

The columns produced by the `VALUES` query are named `column1`, `column2`, and so on.

## Syntax

```sql
VALUES ( <expression> [, ...] ) [, ...]
    [ { UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] <select> ]
    [ ORDER BY <sort_expression> [ ASC | DESC ] [, ...] ]
    [ LIMIT { <count> | ALL } ]
    [ OFFSET <start> [ ROW | ROWS ] ]
    [ FETCH { FIRST | NEXT } [ <count> ] { ROW | ROWS } ONLY ];
```

## Examples

Return a single row, containing two columns.

```sql
VALUES(1, 'first entry')
```

The `VALUES` clause can also contain arbitrarily complex expressions:

```sql
VALUES(1 + 4, now())
```

To return multiple rows from a `VALUES` clause, use multiple
comma-separated bracketed lists:

```sql
VALUES (1, 'first'), (2, 'second'), (1+2, 'third)
```

You can also use `ORDER BY`, `OFFSET`, and `LIMIT` on a `VALUES` clause.

```sql
VALUES (1, 'first'), (3, 'third'), (4, 'fourth'), (2, 'second')
ORDER BY column1
OFFSET 1
LIMIT 2
```
