PDA

View Full Version : can i have aliases for mysql queries?


Raja
04-11-2007, 08:02 AM
Just like unix has aliases for command.

If I say se at the mysql prompt, it should run the query "select * from emp".

thanks in advance

Ana
04-11-2007, 10:00 AM
if you want to make a shorthand reference to elements with long names to make the SQL statements shorter and reduce the chance of typos in the longer names.yes you can use the aliases
A good tutorial here:
http://www.keithjbrown.co.uk/vworks/mysql/mysql_p8.php

In my opinion it is a very good site with interesting tutorials expecially for advanced user of mysql.
I use it frequently.
Good luck!