Mysql has a date type field data in the table is empty, please how to use the SQL script for the filling
CodePudding user response:
The set dt='2020-12-12' The set dt=now () The set dt=curdate ()
Function description NOW () returns the current date and time CURDATE () returns the current date CURTIME () returns the current time DATE () to extract the DATE or the DATE of the DATE/time expressions part EXTRACT () returns the date/time according to the separate parts of the DATE_ADD (), add the specified time interval to date DATE_SUB () from the date of minus the specified time interval DATEDIFF () returns the number of days between two dates DATE_FORMAT () with different formats display date/time