The eighth chapter studies like operator, hundred percent (%) wildcard character, underscore (_) wildcard
P47
Select Prod_id,prod_name from products where prod_name like ' jet% '; #表示检索prod_name列中的值 all words that start with Jet,% indicates that the following characters can be multiple or 0 # Note that the search for MySQL is case-sensitive, if differentiated, that jet and jet are not the same #
Select Prod_id,prod_name from products where prod_name like '%anvil%; #表示任何位置含有anvil, they can be retrieved.
P48
Select Prod_name from products where prod_name like ' s%e '; # indicates that the first bit of retrieval is s, and the last one is all the words of E #
P49 underscore (_) wildcard character
Select Prod_id,prod_name from products where prod_name like ' _ Ton anvil '; #_只能检索出单个字符 #
Select Prod_id,prod_name from products where prod_name like '% ton anvil '; #% can retrieve multiple characters #
Note: You can use the wildcard characters as much as possible with other commands, because wildcards are slower to execute.
"MySQL Must know" study _ the eighth chapter _20180730_ Huan