SQL files are just text files that has sql commands in. If you want to load 
a sql file from mysql prompt you can do like this.

mysql -u root -p mysql

mysql> load file.sql;

It's better to remember you that you'll have to be in the folder where the 
file.sql is before call the mysql prompt.

Hope helped with this.
<[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED]
> Hello, I'm new to MySQL and SQL have some very basic questions about them.
> I'm relatively competant in programming, so maybe if someone could answer 
> ...
>
>
> 1. Are SQL files, eg. foo.sql, referred to as scripts or programs or what.
> (In searching for answers to 2. below and don't know if I'm using the 
> right
> terms)
>
> 2. How do you get MySQL to execute a SQL file? I downloaded
> "fill_help_tables.sql" from the website, and it's comments tell how to 
> load from the command
> line:
> mysql -u root -p mysql < file_name
> but I would like to load a file from the interactive mode, ie. from the
> mysql> prompt. 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to