I have a mysql table and data entries in it:
CREATE TABLE `invoices`.`invoices` (
`InvoiceID` bigint(20) unsigned NOT NULL auto_increment,
`UserID` int(10) unsigned NOT NULL,
`Value` decimal(10,3) NOT NULL,
`Description` varchar(4048) NOT NULL,
`DateTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`InvoiceID`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin5;
I want to remove "on update CURRENT_TIMESTAMP" condition. How can I alter this table?
ALTER TABLE `invoices`.`invoices`
CHANGE `DateTime` `DateTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With