题解 | #检索产品名称和描述(一)#
检索产品名称和描述(一)
https://www.nowcoder.com/practice/47e8101cb2b447038effcf5159e6aa7f
like 关键字查找,“%y”意味着查找开头有y的记录,“y%”意味着查找结尾有y的记录,“%toy%”意味着查找记录中有toy的记录
REGEXP 正则匹配,'toy' 意味着查找记录中有toy的记录
select prod_name, prod_desc from Products where prod_desc REGEXP 'toy' # where prod_desc like '%toy%'