April 2008
Intermediate to advanced
566 pages
21h 55m
English
CURRENT_DATE()
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.
Read now
Unlock full access