I'm new to sql programming. For a computer science project I am trying to apply my knowledge of sql in some way. On SQL Fiddle, I am using the MySQL 5.6 database and I am having so much trouble building schema. This is what it keeps telling me:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[ Name varchar, Description varchar, Ranking int, ]' at line 2"
I need help either learning how to use SQL Fiddle or how to build my schema. Thanks and my code is below.
CREATE TABLE food ( Name varchar(15), Description varchar(50), Ranking int, ); insert into food values ('Watermelon', 'A yummy fruit', 9);
you have a comma after Ranking int.
CREATE TABLE food ( Name varchar(15), Description varchar(50), Ranking int );
INSERT INTO food values ('Watermelon', 'A yummy fruit', 9);