> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# row

> Creates a named STRUCT or ROW value from the given values.

Creates a named STRUCT or ROW value from the given values. It supports unnamed struct. You do not need to specify the field names. The database automatically generates column names, such as `col1, col2,...`.

This function is supported from v3.1 onwards.

struct() is the alias of row().

## Syntax

```Haskell theme={null}
STRUCT row(ANY val, ...)
```

## Parameters

`val`: an expression of any supported type.

This function is a variable argument function. You must pass at least one argument. `value` is nullable. Separate multiple values with a comma (`,`).

## Return value

Returns a STRUCT value which consists of the input values.

## Examples

```Plaintext theme={null}
select row(1,"Apple","Pear");
+-----------------------------------------+
| row(1, 'Apple', 'Pear')                 |
+-----------------------------------------+
| {"col1":1,"col2":"Apple","col3":"Pear"} |
+-----------------------------------------+

select row("Apple", NULL);
+------------------------------+
| row('Apple', NULL)           |
+------------------------------+
| {"col1":"Apple","col2":null} |
+------------------------------+

select struct(1,2,3);
+------------------------------+
| row(1, 2, 3)                 |
+------------------------------+
| {"col1":1,"col2":2,"col3":3} |
+------------------------------+
```

## References

* [STRUCT data type](/documents/4.2/sql-reference/data-types/semi_structured/STRUCT.md)
* [named\_struct](/documents/4.2/sql-reference/sql-functions/struct-functions/named_struct.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.