Name
CURRENT_DATE()
Synopsis
CURRENT_DATE()
This function returns the current date. The usual parentheses
are not required. It’s synonymous with CURDATE().
You can use either in SELECT
statements, as well as
INSERT
and UPDATE
statements to
dynamically set values, or in WHERE
clauses. Here
is an example:
UPDATE appointment SET appt_date = CURRENT_DATE( ) WHERE appt_id = '1250';
This statement changes the appointment date for a client who came in today unexpectedly.
Get MySQL in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.