TIMESTAMP DEFAULT :- in this when new row get inserted or existing row get updated that time current timestamp get inserted.

CURRENT_TIMESTAMP :- in this when row get inserted that time current timestamp get inserted.no change on update.

ON UPDATE CURRENT_TIMESTAMP :- when row get affected that time current timestamp get inserted.

Regards

Prasanna Shejwal

Similar Posts:

Be Sociable, Share!
(2) Comments    Read More   

Comments

raj singh on 11 March, 2008 at 4:01 pm #

Hi Prasanna, your blog is informative but the grammar can improve. I did not understand the diff between all these mysqls because of unclear language.


madhu on 9 April, 2008 at 10:47 am #

Hi Prasanna,
i hava problam while updating a field in a table and in that Date field which is TIMSTAMP dayatype also updating.
This Date field default value is CURRENT_TIMESTAMP .
I am using this query : “UPDATE cheque_dd_details SET InvoiceNo=? Where UserID=? AND PaidTo=? AND ServiceBuyDate=? AND InvoiceNo IS NULL” ,
in this ServiceBuyDate fiels is TIMESTAMP data type


Post a Comment
Name:
Email:
Website:
Comments:


www.flickr.com
arunbagul's photos More of arunbagul's photos
Get Adobe Flash player
-->