Insert current time in MySQL

Sometime we have requirement when we have to insert current time in MySQL table. Here we will see how we can insert current time in MySQL example.

current_time function in MySQL

By using current_time we can get the current time in MySQL.

select current_time();

select current_time();
+----------------+
| current_time() |
+----------------+
| 13:48:16       |
+----------------+
1 row in set (0.00 sec)

We can use select current_time;

select current_time;
+--------------+
| current_time |
+--------------+
| 13:50:06     |
+--------------+
1 row in set (0.00 sec)
Scroll to Top