Name

CURRENT_DATE( )

Synopsis

CURRENT_DATE( )

This function returns the current date. The usual parentheses are not required. This function is synonymous with CURDATE(). You can use both in SELECT statements to dynamically set values or in WHERE clauses.

UPDATE appointment
SET appt_date = CURRENT_DATE( )
WHERE rec_id = '1250';

This statement changes the appointment date for a client that came in today unexpectedly.

Get MySQL in a Nutshell 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.