Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- data
- Machine Learning
- DataFrame
- string
- Dictionary
- numpy
- pandas
- 덴드로그램
- list
- IN
- function
- count()
- matplotlib
- del
- 최솟값
- 반복문
- hierarchical_clustering
- DataAccess
- insert()
- append()
- 분류 결과표
- wcss
- dendrogram
- len()
- sklearn
- 최댓값
- analizer
- nan
- Python
- elbow method
Archives
- Today
- Total
개발공부
[MySQL] NULL 값을 처리하는 함수 IFNULL() 본문
IFNULL(데이터, NULL일 때 바꿀 값)
예제
people 테이블

age 가 NULL 이면 100으로 바꾸기
select *, ifnull(age, 100)
from people;

id가 18인 데이터의 age가 NULL에서 100으로 바뀐것을 볼 수 있다.
'Database > MySQL' 카테고리의 다른 글
| [MySQL] JOIN 과 LEFT JOIN 하는 방법과 예시 (0) | 2022.05.17 |
|---|---|
| [MySQL] 다른 테이블을 참조(Reference)하는 foreign key 설정하는 방법 (0) | 2022.05.17 |
| [MySQL] 조건문 IF (0) | 2022.05.17 |
| [MySQL] 조건문 CASE (0) | 2022.05.17 |
| [MySQL] 날짜 데이터 연산 datediff(), date_add(), +, - (0) | 2022.05.16 |