MySQL full text search equivalents to Google search: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
No edit summary
No edit summary
Line 16: Line 16:
Google * wildcard operator. "Use *, an asterisk character, known as a wildcard, to match one or more words in a phrase" <ref>[http://www.googleguide.com/wildcard_operator.html Google's * Wildcard Operator - Google Guide]</ref> ([http://sqlfiddle.com/#!2/e148e/1/0 online demo])
Google * wildcard operator. "Use *, an asterisk character, known as a wildcard, to match one or more words in a phrase" <ref>[http://www.googleguide.com/wildcard_operator.html Google's * Wildcard Operator - Google Guide]</ref> ([http://sqlfiddle.com/#!2/e148e/1/0 online demo])
* Google: {{kbd | key = <nowiki>狐狸*叫</nowiki>}}
* Google: {{kbd | key = <nowiki>狐狸*叫</nowiki>}}
* MySQL: {{kbd | key = <nowiki>column_name LIKE '狐狸%叫'</nowiki>}}
* 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>


to explore strange new worlds / related articles:
to explore strange new worlds / related articles:

Revision as of 09:47, 19 February 2015


Google search: keyword1 keyword2 same as keyword1 AND keyword2 or keyword1 +keyword2. Icon_exclaim.gif (1) The following is exact words search. (2) Replace column_name with your column name

  • MySQL: column_name REGEXP '易筋經' AND column_name REGEXP '吸星大法' (online demo)
  • MySQL: column_name LIKE '%易筋經%' AND column_name LIKE '%吸星大法%'
  • MySQL: column_name LIKE '%易筋經%吸星大法%' AND column_name LIKE '%吸星大法%易筋經%' Trivial for multiple keywords

Google search: keyword1 OR keyword2

  • MySQL: column_name REGEXP '易筋經' OR column_name REGEXP '吸星大法' (online demo)
  • MySQL: column_name LIKE '%易筋經%' OR column_name LIKE '%吸星大法%'

Google search: keyword1 NOT keyword2 same as keyword1 -keyword2

  • MySQL: column_name REGEXP '易筋經' AND column_name NOT REGEXP '吸星大法' (online demo)
  • MySQL: column_name LIKE '%易筋經%' AND column_name NOT LIKE '%吸星大法%'

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:

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