In the script file add the first statement as 'use db_name;'
Mysql/bin>mysql  < file_name.sql

Thanks,
Rama Raju

-----Original Message-----
From: D Bamud [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 07, 2002 4:01 PM
To: [EMAIL PROTECTED]
Subject: How to run commands written in a file

I have sql commands written in a file. How to run this file at sql> prompt
so that commands executed thru this batch file. Something similar to Oracles
sql> @/mydir/mysql.sql



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to