SQL Auto-Increment by DateTime
Is there a way in my sql to auto increment by the date and time? so say I have a table mytable ===================================================== = Comment_ID = First_Name = Comment = DateTime = ===================================================== = 1 = Bob = FooBar = 11-01-14 11:00 = = 2 = Jack = Blah = 11-01-14 12:29 = = 3 = John = jonny = 12-01-14 07:09 = ===================================================== Is there away to make the date auto-increment? Run this in your MySQL: ALTER TABLE `mytable` CHANGE COLUMN `DateTime` `DateTime` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP ; This sets