文本处理函数
其中,soundex()可以将任何文本串转换为描述其语音表示的字母数字模式的算法
例如:customers表中有一共顾客cust_contact为Y.Lee。soundex()将匹配所有发音类似于Y.Lee(如Y.Lie)的顾客。
select cust_contact from customers
where soundex(cust_contact) = soundex('Y Lie');
日期时间处理函数
MySQL使用的日期格式为yyyy-mm-dd
仅将给出的日期与列中日期的部分进行比较,而不是将给出的日期与整个列值进行比较
select cust_id,order_num from orders
where date(order_date) = '2005-09-01';
select cust_id,order_num from orders
where year(order_date) = 2005 and month(order_date) = 9;