sql - skip characters in like clause of mysql -
hello want skip character while matching string using like
using mysql
. example have string 2011-07-12 06:09
. want match month part of time stamp not whole. know can use %
whole string. want skip characters front , end of part. body tell me how accomplish job
use month()
function grabbing month date. don't re-invent wheel.
if you're really interested in matching string using like
, you'd better off using underscore (_
) wildcard:
select * some_table some_column '__-07-__ __:__'
Comments
Post a Comment