且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Oracle查询字符串,包括连字符

更新时间:2023-02-25 14:43:04

这不是我对Oracle如何处理连字符的观察.这是我所见的简短示例:

That's not my observation of how Oracle treats hyphens. Here's a brief sample of what I see:

SQL> select * from fb;

ID
----------
Web-Page
Web Page
Web -Page

SQL> select * from fb where lower(id) like '%-pa%';

ID
----------
Web-Page
Web -Page

确定要使用下划线而不是连字符吗?下划线是单字符通配符.

Are you sure you're not using the underscore instead of the hyphen? The underscore is a single character wild card.