PostgreSQL ARRAY_REMOVE() function
ARRAY_REMOVE() function
This function is used to remove all elements equal to the given value from the array (array must be one-dimensional).
Syntax:
array_remove(anyarray, anyelement)
Return Type:
anyarray
PostgreSQL Version: 9.3
Example: PostgreSQL ARRAY_REMOVE() function
Code:
SELECT array_remove(ARRAY[1,2,3,2], 2);
Sample Output:
array_remove -------------- {1,3} (1 row)
Previous: ARRAY_PREPEND function
Next: ARRAY_REPLACE 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