home support FAQ resources services partners contact us contact us
 MySQL Tutorial Previous  Next  
 

The procedure sounds cumbersome when written out like that, but when you're actually carrying it out, it provides a way to enter queries quickly and with no typing.

This technique also allows you to edit your queries in the document window, and it allows you to construct new queries by copying and pasting pieces of existing queries. For example, if you often select rows from a particular table but like to view the output sorted in different ways, you can keep a list of different ORDER BY clauses in your document window and then copy and paste the one you want to use for any particular query.

You can use copy and paste in the other direction, too (from your terminal window to your query file). When you enter lines in mysql, they are saved in a file named .mysql_history in your home directory. If you manually enter a query that you want to save for further reference, quit mysql, open .mysql_history in an editor, and then copy and paste the query from .mysql_history into your query file.

You can use copy and paste in the other direction, too (from your terminal window to your query file). When you enter lines in mysql, they are saved in a file named .mysql_history in your home directory. If you manually enter a query that you want to save for further reference, quit mysql, open .mysql_history in an editor, and then copy and paste the query from .mysql_history into your query file.
Previous  Next  
Link Partners: Asia florist, Flowers to India, Hong kong flowers, Site submit, Cheap web hosting, China florist, Japan florist