mysql - What is wrong with my sql? -


  create table if not exists 'test'(   `id` int unsigned not null auto_increment primary key ,   `campaincode` varchar( 100 ) not null ,   `description` varchar( 100 ) not null ,   `paymentplantype` varchar( 100 ) not null ,   `contractlength` int not null ,   `monthlyannuityfactor` double not null ,   `initialfee` double not null ,   `notificationfee` double not null ,   `interestratepercentage` int not null ,   `interestfreemonths` int not null ,   `paymentfreemonths` int not null ,   `fromamount` double not null ,   `toamount` double not null ,   `timestamp` int unsigned not null ,   `storeid` int not null   ) 

you sholud remove ' chars table name below

 create table if not exists test( `id` int unsigned not null auto_increment primary key , `campaincode` varchar( 100 ) not null , `description` varchar( 100 ) not null , `paymentplantype` varchar( 100 ) not null , `contractlength` int not null , `monthlyannuityfactor` double not null , `initialfee` double not null , `notificationfee` double not null , `interestratepercentage` int not null , `interestfreemonths` int not null , `paymentfreemonths` int not null , `fromamount` double not null , `toamount` double not null , `timestamp` int unsigned not null , `storeid` int not null ) 

sql fiddle demo


Comments