# # MySQL intercept function left (), right (), substring (), Substring_index ()
SELECT left (' www.baidu.com ', 3); # www
SELECT right (' www.baidu.com ', 3); # com
SELECT SUBSTRING (' www.baidu.com ', 3); # w.baidu.com
SELECT SUBSTRING (' www.baidu.com ',-3); # com
SELECT SUBSTRING (' www.baidu.com ', 5,5); # Baidu
SELECT substring_index (' www.baidu.com ', '. ', 1); # www
SELECT substring_index (' www.baidu.com ', '. ',-2); # baidu.com
#demo between and is a number that contains the equals sign,
SELECT T. ' Order_no ', left (T. ' Rent_time ', 8), left (T. ' Revert_time ', 8) from Trans T WHERE order_no= ' 491542211061 '
and left (T. ' Rent_time ', 8) between 20160115 and 20160116;
# MySQL settings update column time auto-Modify time
' Update_time ' TIMESTAMP not NULL the DEFAULT current_timestamp on update current_timestamp COMMENT ' Update Time ',
MySQL functions, keywords, features