A timestamp is a sequence of characters, denoting the date and/or time at which a certain event occurred.
The time at which an event is recorded by a timestamp (e.g., entered into a log file) should be very, very close to the time of the occurrence of the event recorded.
example of a timestamp in mysql : 2010-02-02 18:15:37
How Using SQL to insert Timestamp Data Type into MySQL ?
(Provided Table First)
CREATE TABLE `guest_book` (
`id_gb` int(4) NOT NULL AUTO_INCREMENT,
`pengirim` varchar(20) NOT NULL DEFAULT '',
`email` varchar(50) NOT NULL DEFAULT '',
`isi` text NOT NULL,
`tgl` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id_gb`)
)
Just Running A Query
And The Result :
0 comments:
Post a Comment