At 14:27 -0500 5/15/04, Josh Trutwin wrote:
Hi,
I teach a class using Oracle and MySQL and I store a few things like
creating tables for student labs in SQL files. I have them load
these files by typing:
SOURCE filename.sql;
from the MySQL prompt.
A nice feature in Oracle is that you can set a default path where
the client looks for these scripts using: setenv SQLPATH
${HOME}/orascripts, then you don't need to type the full path fo the
SQL script file and it works from whatever directory you started the
client from.
Is there something similar in MySQL?
No.
I'm trying to keep things simple so the MySQL SOURCE command will
find these SQL scripts from whereever the student started MySQL
from. And yes I know that this can be done from outside the MySQL
client using input redirection, but I think students find the SOURCE
command simpler.
Also, any idea why SOURCE filename.sql; works in MySQL 5.0.0 and \.
filename.sql; does not?
Leave out the trailing semicolon for short-form commands.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]