Answers for "variable in mysql query today"

SQL
0

mysql set variable to today's date

SELECT CAST(CURRENT_DATE() AS CHAR(50)) INTO @today;
SELECT CAST(DATE_ADD(CURRENT_DATE, INTERVAL -1 DAY) AS DATE) INTO @yesterday;

SELECT @today, @yesterday
Posted by: Guest on November-02-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language