MySQL-Executing SQL Statements from a .sql File


MySQL-Executing SQL Statements from a .sql File

However, it is also possible to put your SQL statements in a file and then tell mysql to read its input from that file.

If you are already running mysql, you can execute an SQL script file using the source command or . command:

mysql> source file_name
mysql> . file_name
Executing SQL Statements from a .sql File with source command

Executing SQL Statements from a .sql File with source command

Done!!!

References:

http://dev.mysql.com/doc/refman/5.0/en/batch-commands.html
Related articles

View My Profile on Cloudbook.net

Advertisements

Any Suggestions?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s