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