Postgresql json like query

后端 未结 4 1737
别跟我提以往
别跟我提以往 2021-02-02 06:02

I have the following table called module_data. Currently it has three rows of entries:

                id                               data
0ab5203b-9157-4934-         


        
4条回答
  •  滥情空心
    2021-02-02 06:26

    If the data column is text type, then use ->> on cast:

    select * from module_data where data::json->>'title' like '%Board%'
    

    If it's already json:

    select * from module_data where data->>'title' like '%Board%'
    

提交回复
热议问题