mySql now function

the mysql now function is used to get the current system date and time.

mysql now() syntax

         select    now()    from   table_name;

this database table use in the below mysql now function example

below is a selection from the "users" table:

useridfirstnamelastnamesalarybonus
1sandeepkumar10,0001000
2ankitkumar20,0002000
3ramnehra30,0003000
4vikashnehra12,0002000

mysql now function example

               
    select    firstname, now()   as  date    from    users;

output : try it yourself