728x90
반응형
COALESCE(column, 0)
요거 사용해서 변환하면 간단!
select name, COALESCE(count, 0) as count
from sample_table
반응형
'SQL' 카테고리의 다른 글
오라클 DUAL 테이블로 원하는 개수만큼 행 생성하기 (0) | 2025.03.06 |
---|---|
[PostgreSQL] current transaction is aborted, commands ignored until end of transaction block (0) | 2023.11.01 |
[SQL] POSTGRES SQL ->>, ->가 뭔가요? (0) | 2022.12.21 |
[SQL] value too long for type character (0) | 2022.12.20 |
[MYSQL] DATEDIFF로 날짜 차이 계산하기 (0) | 2022.10.28 |
댓글