SQL query:
CREATE TABLE bonus(
bonusid INT( 10 ) DEFAULT \'0\' NOT NULL AUTO_INCREMENT ,
empid INT( 10 ) DEFAULT \'0\' NOT NULL ,
datebonus DATE DEFAULT \
default value is not allowed to the primary key because of if you used default value to primary key then some time the record is inserted as same and primary key is not allowed to insert same value in this column.
check this
CREATE TABLE bonus(
bonusid INT( 10 ) 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 )
);
if you use some column as primary key then it is default not null is not use to declare this. refer this link for auto increment
http://www.w3schools.com/sql/sql_autoincrement.asp