- 分享一個mysql8查詢語句的新特性
- 首先看一下表字段
其中有name及content,content中存的是json字符串,要查詢content中test的值,也就是要查詢到10,怎麼查呢,如下:
select content->'$.test' as test from capital_config where name = "測試"
我們來看一下結果
取到了,語句中content爲我們要取值的字段名,-> 則是要取的json中key
select content->'$.test' as test from capital_config where name = "測試"
我們來看一下結果
取到了,語句中content爲我們要取值的字段名,-> 則是要取的json中key
Spring boot 配置數據源 spring: mvc: favicon: enabled: false datasource: primary: username: root