I have just started using MySQL in a Windows environment. I can run SQL commands from mysql> prompt in DOS and I can use SQL from the prompt to create a database table from the command line. However, I tried running a really simple script to build a table (using exactly same SQL as I used on the command line) as follows:
mysql> @ <create.sql>;
Note: create.sql is in my c:\mysql\bin
but it keeps telling me I have an error in my SQL syntax near --repeates my command --line1.
The SQL inside the sql script (create.sql) is as follows:
Create database01.customers (fname TEXT, Lname TEXT);
Note database01 already exists!
I have tried leaving off the ; at end in the scrtipt also.....Nothing seems to work but like I said if I were to enter the exact same SQL line from the command prompt it creates the table.?????
mysql> @ <create.sql>;
Note: create.sql is in my c:\mysql\bin
but it keeps telling me I have an error in my SQL syntax near --repeates my command --line1.
The SQL inside the sql script (create.sql) is as follows:
Create database01.customers (fname TEXT, Lname TEXT);
Note database01 already exists!
I have tried leaving off the ; at end in the scrtipt also.....Nothing seems to work but like I said if I were to enter the exact same SQL line from the command prompt it creates the table.?????