I want to have a select statement inside the mysql trigger that has the following:
SELECT id开发者_Python百科 WHERE date = TODAY'S TAKE in Y-m-d format
How do I get today's date in Y-m-d format in the select statement above?
thanks!
Use the CURDATE()
function.
SELECT id WHERE date = CURDATE();
精彩评论