PostgreSQL STRING_TO_ARRAY() function
STRING_TO_ARRAY() function
This function is used to split a string into array elements using supplied delimiter and optional null string.
Syntax:
string_to_array(text, text [, text])
Return Type:
text[]
PostgreSQL Version: 9.3
Example: PostgreSQL STRING_TO_ARRAY() function
Code:
SELECT string_to_array('xx~^~yy~^~zz', '~^~', 'yy');
Sample Output:
string_to_array ----------------- {xx,NULL,zz} (1 row)
Previous: ARRAY_UPPER function
Next: UNNEST function
- 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