Daniel Daniel - 2 months ago 6
MySQL Question

SQL check if date is on JUNE

Currently I have this query

SELECT SESSIONID, SESSIONDATE, CONCAT ('$', SESSIONPRICE)
FROM SESSIONS
WHERE SESSIONDATE = (%-JUN-%);


which does not do what i want it to do, I want it to check if session date is on the month of June. How would I do this?

A picture of session dates is below.
session dates

Answer
SELECT SESSIONID, SESSIONDATE, CONCAT ('$', SESSIONPRICE)
FROM SESSIONS
WHERE SESSIONDATE like '%-JUN-%';