dqc22586 2017-09-22 07:18
浏览 36
已采纳

用于从mysql中的json_encided列中查找值的sql?

I have a column of json_encoded in my table and want to check a value exist or not in that column. What type of query should write?

Example: I have a column in which values are: ["1","2","3","4"] and I want to check through query that 1 exists or not.

  • 写回答

3条回答 默认 最新

  • duandi8852752 2017-09-22 07:30
    关注

    Try:

    SELECT * FROM `tableName` WHERE Column LIKE '%"1"%';
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?