MySQL Forums
Forum List  »  Newbie

Re: Insert Date (newbie)
Posted by: Kevin Miller
Date: April 12, 2005 08:39AM

Yes you need to reference the field in your query.

So lets says I have a datetime column called "mytime" in the table "mytable" and I want to insert a new record to the current time:

INSERT INTO mytable SET mytime=now();

Another method would be to use the TIMESTAMP column that is set to update to the current time automatically whenever its particular record is edited.

|<>|

Options: ReplyQuote


Subject
Written By
Posted
April 09, 2005 04:35PM
April 10, 2005 10:59PM
April 11, 2005 07:59AM
Re: Insert Date (newbie)
April 12, 2005 08:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.