SQL query:
CREATE TABLE bonus(
bonusid INT( 10 ) DEFAULT \'0\' NOT NULL AUTO_INCREMENT ,
empid INT( 10 ) DEFAULT \'0\' NOT NULL ,
datebonus DATE DEFAULT \
Even though the
bonusid
column isNOT NULL
- you don't have to specify adefault value
if it has the specialauto_increment
option when youcreate
thetable
.
Try As follows:
CREATE TABLE bonus(
bonusid INT( 10 ) NOT NULL AUTO_INCREMENT ,
empid INT( 10 ) DEFAULT '0' NOT NULL ,
datebonus DATE DEFAULT '0000-00-00' NOT NULL ,
bonuspayment VARCHAR( 200 ) NOT NULL ,
note TEXT NOT NULL ,
PRIMARY KEY ( bonusid )
);
FIDDLE DEMO HERE