views:

86

answers:

2

Hi All,

I have written the SQL file with on excecuting it is throwing the error as 

mysql> @"C:\Documents and Settings\Hemant\Desktop\create_tables.sql"; ERROR 1064 (42000): 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 '@"C:\ Documents and Settings\Hemant\Desktop\create_tables.sql"' at line 1

on line 1 code is CREATE DATABASE IF NOT EXISTS test; DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE test;

please let me know is i am missing something

A: 

Correct me if I'm wrong, but isn't there a table test by default when you setup PHPMyAdmin?

Ben Fransen
i have already created a database named test........
Dev
A: 

Extra semi column after test

Unreason
i have updated this to now CREATE DATABASE IF NOT EXISTS `test`; USE test;
Dev
Did it work? `CREATE DATABASE IF NOT EXISTS test DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE test;` should have worked, too (and might be required). Also... there's a http://stackoverflow.com/faq that will explain what is supposed to be your next action...
Unreason