【问题标题】:SQL select using condition that a column starts with a certain stringSQL选择使用列以某个字符串开头的条件
【发布时间】:2009-08-11 07:37:27
【问题描述】:

我正在使用 sql。 如何从表中选择所有项目。 其中列(varchar)路径以某个字符串开头:“stringABC”

select * from ATable where path like 'stringABC';

上面的sql错了,谁能帮我解决一下?

非常感谢!

【问题讨论】:

    标签: sql mysql select


    【解决方案1】:
    select * 
    from ATable 
    where path like 'stringABC%'
    

    【讨论】:

      【解决方案2】:

      select * from ATable where path like 'string%'

      【讨论】:

        猜你喜欢
        • 2012-07-05
        • 2015-08-30
        • 2014-12-02
        • 2016-05-20
        • 1970-01-01
        • 2022-12-24
        • 1970-01-01
        • 2011-06-27
        相关资源
        最近更新 更多