【发布时间】:2021-07-04 03:05:17
【问题描述】:
我需要使用 localId 搜索键, 我尝试了这两个查询:
SELECT *
FROM public.translations
where datas->>'localId' = 7;
SELECT *
FROM public.translations
where datas->>'localId'::text = '7';
没有结果。
请问我该怎么做?
当我进行此查询时,我没有任何值
SELECT datas->>'localId' as local
FROM public.translations
SELECT datas::json->>'localId' as local
FROM public.translations
【问题讨论】:
-
样本数据最好显示为formatted text。请参阅here,了解有关如何创建漂亮表格的一些提示。
标签: sql json postgresql