일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- dataframe
- C++
- awk
- null
- DROP
- python
- c++11
- expect
- pi
- boost
- if
- 쉘
- conda
- ngui
- pandas
- mysql
- List
- Unity
- ubuntu
- Shader
- 배열
- autovacuum
- sqlite
- SSH
- postgresql
- SVN
- FIND
- with
- sql
- Eclipse
Archives
- Today
- Total
その先にあるもの…
배열 요소 null, array_replace 본문
https://www.postgresql.org/docs/current/functions-array.html#ARRAY-FUNCTIONS-TABLE
array_length ( anyarray, integer ) → integer
Returns the length of the requested array dimension. (Produces NULL instead of 0 for empty or missing array dimensions.)
array_length(array[1,2,3], 1) → 3
array_length(array[]::int[], 1) → NULL
array_length(array['text'], 2) → NULL
array_replace ( anycompatiblearray, anycompatible, anycompatible ) → anycompatiblearray
Replaces each array element equal to the second argument with the third argument.
array_replace(ARRAY[1,2,5,4], 5, 3) → {1,2,3,4}
update tb_player set point = array_replace( point, null, 0 ) where array_length( point, 1 ) != 17
'프로그래밍 > SQL' 카테고리의 다른 글
csv export / import (0) | 2022.10.11 |
---|---|
펌) NOT IN 쿼리 성능 개선하기 (PostgreSQL) (0) | 2022.10.05 |
unique 제약조건과 인덱스 (0) | 2022.09.26 |
펌)postgresql 자습서 (0) | 2022.01.13 |
펌) [PostgreSQL] 시간값 다루기 (0) | 2021.11.18 |
Comments