【发布时间】:2020-11-25 04:43:02
【问题描述】:
我目前有这张桌子
ID | Seller_Name | Seller_Non_Working_Day
1 | Seller A | [1,7]
2 | Seller B | [1]
3 | Seller C | []
4 | Seller D | [1,7]
我正在尝试提取仅在周日不工作的卖家,也就是 Seller_Non_Working_Day 中的 [1]。该字段为 JSON 类型。
这是我的查询,我没有得到任何回应:(
select * from table_name
where Seller_Non_Working_Day IN ('[1]')
可以帮忙吗?
【问题讨论】:
-
我正在尝试提取仅在周日不工作的卖家,也就是 Seller_Non_Working_Day 中的 [1]。 即输出必须只包含带有
ID = 2的行?如果是这样,请使用直接比较WHERE Seller_Non_Working_Day = '[1]'。