[Cialug] Problems with Mariadb insert

Ralph Kessel ralphkessel75 at yahoo.com
Sun Mar 3 15:24:41 CST 2013


I continuously have a problem with inserting this table in my db with the following (mysql/heidi/mariadd) database
 
DROP TABLE IF EXISTS Food; 
 
CREATE TABLE Food (  
 catalog_number INT(6)        NOT NULL AUTO_INCREMENT, 
 name           VARCHAR(20)   NOT NULL, 
 added_date     DATE          NOT NULL, 
 category       VARCHAR(20)   NOT NULL, 
 type           VARCHAR(20)   NOT NULL, 
 description    VARCHAR(255)  NOT NULL, 
 price          DECIMAL(7,2)  NOT NULL, 
 pix            VARCHAR(20)   NOT NULL DEFAULT "Missing.jpg", 
PRIMARY KEY(catalog_number) ); 
 
INSERT INTO `Food` VALUES (1,"Navel","2005-01-03","Fruit","Oranges","Sweet, juicy.","2.10","Missing.jpg"); 
INSERT INTO `Food` VALUES (3,"Romaine","2005-01-03","Vegetables","Lettuce","Leafy, crispy.","1.10","Missing.jpg"), 
INSERT INTO `Food` VALUES (4,"Delicious","2005-01-05","Fruit","Apples","Bright red, sweet, fresh, crispy.","1.10","Missing.jpg")

 #1064 - You have an error in your SQL syntax; check the manual that 
corresponds to your MariaDB server version for the right syntax to use 
near 'INSERT INTO `Food` VALUES 
(4,"Delicious","2005-01-05","Fruit","Apples","Bright r' at line 2 

Any explanation would be greatly appreciated


More information about the Cialug mailing list