How do I insert into a record a value of the current time in MySQL
INSERT INTO cat_herder.cat (id, name, breed_id, secondary_breed_id, date_modified)
VALUES("asdfs-ab1234-jhgb2-34jh", "Meowsers", 0,1, TIME.NOW())
TIME.NOW
appears not 开发者_如何学Goto work even though heidisql suggests it.
you just need NOW() not TIME.NOW()
Try using NOW()
this way:
INSERT INTO cat_herder.cat (
id,
name,
breed_id,
secondary_breed_id,
date_modified)
VALUES (
"asdfs-ab1234-jhgb2-34jh",
"Meowsers",
0,
1,
NOW());
Try simply now()
, you don't need the time.
part.
精彩评论