일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- Bastion Server
- 컴포지트패턴
- 시스템 설계
- Infra
- tenneling
- goroutine
- UnBuffered channel
- golang
- Golines
- argocd
- GoF 디자인패턴
- Buffered channel
- Lambda@Edge
- AWS
- AWS Infra
- go
- Helm V3
- 윈도우키보드
- 클래스 관계
- 디자인패턴
- gitops
- 알림 시스템
- Live Template
- 대규모 시스템 설계
- GoF
- Kubernetes
- System Design
- notification system
- image resizing
- Logrus
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