原创  SQL - Escape Characters in LIKE condition 收藏

If you want to search for a % or a _ character in a LIKE condition. You can do this using an Escape character.
Please note that you can define an escape character as a single character (length of 1) ONLY.

For example,
SELECT * FROM suppliers
WHERE supplier_name LIKE '/_%' escape '/';
This SQL statement identifies the / character as an escape character. This statement will return all suppliers whose name starts with _.

发表于 @ 2009年06月09日 22:12:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:Oracle ERP系統借贷关系表 | 新一篇:PLSQL - Hierarchical Query using a START WITH clause

  • 发表评论
  • 评论内容:
  •  
Copyright © zikwang
Powered by CSDN Blog