select * from table_name where column like ' '

前端 未结 4 1924
南旧
南旧 2021-01-18 07:22

I need to find records containing html code such as \' \' But when I try to run the select * from table_name where column like \' %\' I got p

相关标签:
4条回答
  • 2021-01-18 08:00

    Have a look at this:

    SQL Plus FAQ

    e.g.

    SET ESCAPE '\'
    SELECT '\&abc' FROM dual;
    
    0 讨论(0)
  • 2021-01-18 08:01

    The backslash should work, but I think you need to start your query with

    SET ESCAPE ON
    
    0 讨论(0)
  • 2021-01-18 08:09

    In PL/SQL, you would use:

    BEGIN select <Column> from <Table_name> into <Variable> where <Column> LIKE '\&nbsp\%' ESCAPE '\'; END /

    Resources:

    Wilcards in SQL on PSOUG.org

    LIKE Condition in Oracle® Database SQL Language Reference 11g Release 2 (11.2)

    0 讨论(0)
  • 2021-01-18 08:14

    Easier way:

    SET DEFINE OFF

    See: SET DEFINE

    0 讨论(0)
提交回复
热议问题