【问题标题】:How to search the underscore in a column for SQL? [duplicate]如何在 SQL 列中搜索下划线? [复制]
【发布时间】:2022-01-21 15:35:35
【问题描述】:

如何在 SQL 的列中搜索下划线?

我试过了:

select * from xxx where xxx like '%_%';select * from xxx where xxx like '%$_%';

但这并没有按预期工作。如何在 SQL LIKE 运算符中转义下划线?

【问题讨论】:

  • 你用的是什么数据库?
  • 我用的是Oracle SQL

标签: sql oracle-sqldeveloper


【解决方案1】:

试试这个:

SELECT * FROM xxx WHERE xxx LIKE '%[_]d'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-15
    • 1970-01-01
    相关资源
    最近更新 更多