[mariadb] 10.6 버전에 추가된 json_table 함수
10.6 버전에 새로 추가된 함수 같습니다.
개발할때 유용하게 사용할것 같아서
소개드립니다.
아시는분들은 아시겠지만 모르시는 분들을 위해서 정보 공유합니다.
활용 예1)
[code]
set @json='
[
{"name":"Laptop", "color":"black", "price":"1000"},
{"name":"Jeans", "color":"blue"}
]';
select * from json_table(@json, '$[*]'
columns(
name varchar(10) path '$.name',
color varchar(10) path '$.color',
price decimal(8,2) path '$.price' )
) as jt;
[/code]
활용 예2)
[code]
SELECT * FROM data_table t1, JSON_TABLE(
t1.words, '$.123456.*' COLUMNS (word TEXT PATH '$')
) AS jt;
+------------------------------------------------------------------------------+-------+
| words | word |
+------------------------------------------------------------------------------+-------+
| {"123456":{"first":"hello","second":"there"}, "78910":{"first":"All good?"}} | hello |
| {"123456":{"first":"hello","second":"there"}, "78910":{"first":"All good?"}} | there |
+------------------------------------------------------------------------------+-------+
[/code]
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5246 | node.js |
swallow
|
2년 전 | 1106 | |
| 5245 | PHP |
swallow
|
2년 전 | 2528 | |
| 5244 | PHP |
swallow
|
2년 전 | 1287 | |
| 5243 | JavaScript |
swallow
|
2년 전 | 686 | |
| 5242 | node.js |
swallow
|
2년 전 | 667 | |
| 5241 | node.js |
swallow
|
2년 전 | 779 | |
| 5240 | MySQL |
swallow
|
2년 전 | 808 | |
| 5239 | MySQL | 2년 전 | 784 | ||
| 5238 | JavaScript | 2년 전 | 983 | ||
| 5237 | 웹서버 |
swallow
|
2년 전 | 3990 | |
| 5236 | PHP |
swallow
|
2년 전 | 900 | |
| 5235 | PHP |
swallow
|
2년 전 | 1379 | |
| 5234 | 기타 | 2년 전 | 763 | ||
| 5233 | jQuery |
swallow
|
2년 전 | 2037 | |
| 5232 | 2년 전 | 618 | |||
| 5231 | 2년 전 | 1174 | |||
| 5230 | 2년 전 | 1077 | |||
| 5229 | PHP |
swallow
|
2년 전 | 1025 | |
| 5228 | MySQL | 2년 전 | 727 | ||
| 5227 | PHP |
swallow
|
2년 전 | 837 | |
| 5226 | PHP |
swallow
|
2년 전 | 1811 | |
| 5225 | PHP | 2년 전 | 576 | ||
| 5224 | node.js |
swallow
|
2년 전 | 4084 | |
| 5223 | PHP |
swallow
|
2년 전 | 1317 | |
| 5222 | 기타 |
techstar
|
2년 전 | 563 | |
| 5221 | PHP | 2년 전 | 653 | ||
| 5220 |
swallow
|
2년 전 | 906 | ||
| 5219 | 2년 전 | 881 | |||
| 5218 | 2년 전 | 523 | |||
| 5217 | 2년 전 | 1001 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기