hello I want to skip some character while matching any string using like using mysql. For example I have a string like this 2011-07-12 06:09. I want to match the only month part of the time stamp not whole. I know I can use % for whole string. I want to skip characters from front and end of that part. Would any body tell me how to accomplish this job
hello I want to skip some character while matching any string using like using
Share
Use the
MONTH()function for grabbing the month from a date. Don’t re-invent the wheel.If you’re really interested in matching a string using
like, you’d be better off using the underscore (_) as a the wildcard: