Hi,

> I would like to see some 'bash-like' abilities for an alias command and a
> .mysql file or something similar to store commonly used queries (to be
> accessed by a single keyword). I find myself writing extremely long
> queries from time to time and I have to store them in a text file and
> worry about copying and pasting to use them.

No need for new features!

What you use at the moment (storing frequently-used queries in text files)
just happens to be the perfect solution, with but one change. You don't need
to manually copy and paste your queries from text files. Simply tell MySQL
to 'execute' the file's contents, like so:

mysql> source /path/to/your_stored_query.sql

Or you can use the shorthand version:

mysql> \. /path/to/your_stored_query.sql

In fact, the latest versions of the MySQL client program have lots of useful
options like this (such as paging, outputting to a file, etc.). Just type
"help" for details of all available commands.

Regards,

------------------------------------------------
Basil Hussain ([EMAIL PROTECTED])


---------------------------------------------------------------------
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