How to get current date & time in MySQL?

后端 未结 10 1203
情深已故
情深已故 2020-11-29 17:18

Is there a value or command like DATETIME that I can use in a manual query to insert the current date and time?

INSERT INTO servers (
  server_name, online_         


        
10条回答
  •  佛祖请我去吃肉
    2020-11-29 17:52

    You can use NOW():

    INSERT INTO servers (server_name, online_status, exchange, disk_space, network_shares, c_time)
    VALUES('m1', 'ONLINE', 'exchange', 'disk_space', 'network_shares', NOW())
    

提交回复
热议问题