MySQL full text search equivalents to Google search: Difference between revisions
Jump to navigation
Jump to search
m (→OR) |
|||
| Line 24: | Line 24: | ||
* MySQL: {{kbd | key = <nowiki>column_name LIKE '狐狸%叫'</nowiki>}}<ref>[http://www.mysqltutorial.org/mysql-like/ Using MySQL LIKE Operator to Select Data Based on Pattern Matching]</ref> | * MySQL: {{kbd | key = <nowiki>column_name LIKE '狐狸%叫'</nowiki>}}<ref>[http://www.mysqltutorial.org/mysql-like/ Using MySQL LIKE Operator to Select Data Based on Pattern Matching]</ref> | ||
== references or related articles == | |||
to explore strange new worlds / related articles: | to explore strange new worlds / related articles: | ||
* [http://dev.mysql.com/doc/refman/5.1/en/regexp.html MySQL :: MySQL 5.1 Reference Manual :: 12.5.2 Regular Expressions] | * [http://dev.mysql.com/doc/refman/5.1/en/regexp.html MySQL :: MySQL 5.1 Reference Manual :: 12.5.2 Regular Expressions] | ||
| Line 29: | Line 30: | ||
* [https://search.yahoo.com/search/options?fr=fp-top&p= Yahoo Advanced Web Search] | * [https://search.yahoo.com/search/options?fr=fp-top&p= Yahoo Advanced Web Search] | ||
* [http://onlinehelp.microsoft.com/en-us/bing/ff808438.aspx Advanced search options] of bing | * [http://onlinehelp.microsoft.com/en-us/bing/ff808438.aspx Advanced search options] of bing | ||
other search cases: if the column ... (inspired by [http://www.outwit.com/ OutWit]) | |||
* contains ____ | |||
* does not contain ____ | |||
* begins with ____ | |||
* does not begins with ____ | |||
* ends with ____ | |||
* does not ends with ____ | |||
* equals to ____ | |||
* does not equal ____ | |||
references | references | ||
Revision as of 15:14, 13 March 2015
AND
case1: Google search: keyword1 keyword2 same as keyword1 AND keyword2 or keyword1 +keyword2.
(1) The following is exact words search. (2) Replace column_name with your column name
- Google: 易筋經 AND 吸星大法
- MySQL: column_name REGEXP '易筋經' AND column_name REGEXP '吸星大法'
- MySQL: column_name LIKE '%易筋經%' AND column_name LIKE '%吸星大法%' (online demo[1])
- MySQL: column_name LIKE '%易筋經%吸星大法%' AND column_name LIKE '%吸星大法%易筋經%'
Trivial for multiple keywords
OR
case2: Google search: keyword1 OR keyword2
- Google: 易筋經 OR 吸星大法
- MySQL: column_name REGEXP '易筋經' OR column_name REGEXP '吸星大法'
- MySQL: column_name LIKE '%易筋經%' OR column_name LIKE '%吸星大法%' (online demo[2])
NOT
case3: Google search: keyword1 NOT keyword2 same as keyword1 -keyword2
- Google: 易筋經 NOT 吸星大法
- MySQL: column_name REGEXP '易筋經' AND column_name NOT REGEXP '吸星大法' (online demo)
- MySQL: column_name LIKE '%易筋經%' AND column_name NOT LIKE '%吸星大法%'
* wildcard operator
case4: Google * wildcard operator. "Use *, an asterisk character, known as a wildcard, to match one or more words in a phrase" [1] (online demo)
- Google: 狐狸*叫
- MySQL: column_name LIKE '狐狸%叫'[2]
to explore strange new worlds / related articles:
- MySQL :: MySQL 5.1 Reference Manual :: 12.5.2 Regular Expressions
- Google 進階搜尋, Punctuation, symbols & operators in search - Search Help
- Yahoo Advanced Web Search
- Advanced search options of bing
other search cases: if the column ... (inspired by OutWit)
- contains ____
- does not contain ____
- begins with ____
- does not begins with ____
- ends with ____
- does not ends with ____
- equals to ____
- does not equal ____
references
related news:
| MySQL related news |
|---|
|
Failed to load RSS feed from https://news.google.com.tw/news/feeds?pz=1&cf=all&ned=us&hl=en-US&q=mysql&cf=all&scoring=n&output=rss: Error parsing XML for RSS
|