Hi,
In MySql I want to execute (run) a file having create table scripts (around 250 tables). Can somebody tell me how to do that.
Shan
Hi,
In MySql I want to execute (run) a file having create table scripts (around 250 tables). Can somebody tell me how to do that.
Shan
Shankar,
Depending on what version of mySQL you're running, you can use the source switch to execute:
mysql>. '/path/to/filename.sql'
Remember that you don't need the semi-colon at the end of the statement and if you're running on Win32 to either use the Unix-style forward slashes in your path statement or escape-slashes if you use the Win32 backslash. Running the switch \h (or ?) from the mySQL command prompt will give you a list of supported command line switches. Hope this helps.
Cheers,
Geoff A. Virgo
Hi,
I tried that it's not working. It says unable to find or open the file.
The following is working
shell> mysql databasename < filename
Thanks,
Shankar