I have trying to create a MySQL database table as:
But it shows me a error that :Code:CREATE TABLE `tolltaxsystem1.2`.`vehicle`(
`vehicle_type` ENUM('LMV','LCV','BUS','TRUCK','MAV') NOT NULL ,
`vehicle_num` VARCHAR(12) NOT NULL ,
`journey` ENUM('SJ','CR','EX') NOT NULL ,
`exempted_type` VARCHAR(4) NOT NULL DEFAULT 'NA' ,
`material` ENUM('O','ME','MG','AG') NOT NULL DEFAULT 'O' ,
`amount` DOUBLE(5,2) NOT NULL DEFAULT '0.0' ,
`booth_num` ENUM('1','2','3','4','5','6','7','8','9') NOT NULL ,
`lane_num` TINYINT NOT NULL DEFAULT '0' ,
`passed_at` DATETIME NOT NULL DEFAULT NOW(),
`image` BLOB
)
Please guide me how to remove this error, as i want to store current date and time in the column with every new row insertion with NOW() function..........Code:Error Code : 1067
Invalid default value for 'passed_at'
