Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Question about Queries

Status
Not open for further replies.

killglance

Technical User
Jan 9, 2004
3
GB
Hi all,

I have written a basic .sql script to create a particular table. I have used this script on SQL2000 and all is fine. I am running mysql 1.4 and am trying to find out how to run the script in mysql admin without success. The readme files aren't very useful and the interface is not giving any clues.

If someone can spare the time to give me a hand I'd appreciate it.

Thanks in advance
 
Do you mean MySQL 4.1?

You can run a MySQL batch script using the mysql client program. The syntax (on Windows) is:
mysql [dbname] <filename
For example:
mysql <batchscript.sql
or
mysql testdb <batchscript.sql

The script must have each SQL statement terminated by a semicolon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top