일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- UnBuffered channel
- 티스토리챌린지
- esbuild
- Intellij
- Buffered channel
- apollo router
- AWS
- 디자인패턴
- golang
- cosine similarity metric
- go
- m4 pro
- Infra
- intellij ide
- 사설 ip
- Logrus
- body size
- 오블완
- 코사인 유사성 메트릭스
- typescript
- Kubernetes
- javascript
- goland
- gitops
- http 413
- 배포 파이프라인
- 배포 프로세스
- kube-prometheus-stack
- GoF
- elasticsearch
Archives
- Today
- Total
Fall in IT.
MySQL JSON 데이터 필드 조회하는 방법 본문
반응형
문제
User Table에 agreement 필드가 있고,
agreement 필드의 값으로 JSON DATA가 저장되어 있을 경우 JSON DATA의 특정 값을 조회하고 싶다.
방법
# 마케팅 알람설정값 모두 조회 SELECT JSON_EXTRACT(agreement, '$.MarketingAlarm') as MarketingAlarm FROM user # 마케팅 알람설정이 true인 데이터만 조회 SELECT JSON_EXTRACT(agreement, '$.MarketingAlarm') as MarketingAlarm FROM user WHERE JSON_EXTRACT(agreement, '$.MarketingAlarm') = true
반응형
'데이터베이스 > MySQL' 카테고리의 다른 글
A Table에서 B Table로 데이터 옮기는 방법 (0) | 2019.07.23 |
---|
Comments