【问题标题】:Select all rows where a column contains two or more times a string选择列包含两次或多次字符串的所有行
【发布时间】:2015-04-22 09:02:59
【问题描述】:

我有一个 Player 表,其中有一列名为 Info

是否可以选择PlayerInfo 列包含单词"foo" 的所有行两次或更多次

【问题讨论】:

  • 类似SELECT Info FROM Player WHERE Info LIKE '%foo%'?

标签: sql sqlite


【解决方案1】:

当然可以,在你的 where 子句中,只需在 % 符号之间写两次或多次foo

where Info like '%foo%foo%'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-10-18
    • 2019-05-25
    • 1970-01-01
    • 2016-02-11
    • 1970-01-01
    • 2021-06-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多