PostgreSQL UNNEST() function
UNNEST() function
This function is used to expand an array to a set of rows.
Syntax:
unnest(anyarray)
Return Type:
setof anyelement
PostgreSQL Version: 9.3
Example: PostgreSQL UNNEST() function
Code:
SELECT unnest(ARRAY[1,2]);
Sample Output:
unnest -------- 1 2 (2 rows)
Previous: STRING_TO_ARRAY function
Next: Introduction to JOIN
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework