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
- function
- 최댓값
- count()
- elbow method
- 덴드로그램
- del
- Machine Learning
- 반복문
- wcss
- pandas
- numpy
- 분류 결과표
- IN
- analizer
- DataAccess
- data
- list
- insert()
- Dictionary
- 최솟값
- matplotlib
- DataFrame
- nan
- string
- Python
- len()
- append()
- dendrogram
- hierarchical_clustering
- sklearn
Archives
- Today
- Total
개발공부
[MySQL] NULL인지 아닌지 구별하는 IS NULL, IS NOT NULL 본문
'= NULL '은 문법상 오류가 있다
NULL을 구분하기위해선 IS NULL이나 IS NOT NULL을 사용해야한다.
people 테이블
위와같은 people 테이블이 있다.
여기서 age가 null인 데이터만 출력하고 싶다면 is null 을 사용하면 된다.
select *
from people
where age is null;
반대로 age가 null이 아닌 데이터만 출력하고 싶다면 is not null 을 사용하면 된다.
select *
from people
where age is not null;
'Database > MySQL' 카테고리의 다른 글
[MySQL] Error Code: 1062. Duplicate entry 가 나오는 이유 (0) | 2022.05.18 |
---|---|
[MySQL] 테이블의 unique 설정하는 방법 (0) | 2022.05.18 |
[MySQL] group by 의 having 사용법 (0) | 2022.05.17 |
[MySQL] JOIN 과 LEFT JOIN 하는 방법과 예시 (0) | 2022.05.17 |
[MySQL] 다른 테이블을 참조(Reference)하는 foreign key 설정하는 방법 (0) | 2022.05.17 |