Twinkie
Banned
- Messages
- 1,389
- Reaction score
- 12
- Points
- 0
Why is SQL saying now() is an invalid default value for a datetime field?
Looks fine to me?
Code:
CREATE TABLE Catagories (
ID INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR(100) NOT NULL UNIQUE,
Created DATETIME DEFAULT NOW(),
Modified DATETIME DEFAULT NOW(),
Notes VARCHAR(255)
)
~Error: Invalid default value for 'Created'
Last edited: