MySQL synthax error

They have: 1 posts

Joined: May 2012

hi guys I 'm a beginner with MySQL, I want to create a map database using MySQL which can store and sent data (picture and coordinate) but when am writing my code;

mysql> use map info
Database changed
mysql> cretate table map_info (
-> country varachar (30),
-> regions varachar (30),
-> );
ERROR 1064 (42000): you have an error in your SQL syntax; check the manual that corresponds to your MySQL server, please can you help me ??

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Get rid of the comma at the end of the "Regions" line, that is telling mySQL that there is another field coming when there isn't one.

-Greg

They have: 11 posts

Joined: Apr 2013

If you want to run your sgl command well in Mysql database always use semicolon at the end of statement for termination. and write the code in proper sequence

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.