Saving commands for later re-use in MySQL?

Posted by Zombies on Stack Overflow See other posts from Stack Overflow or by Zombies
Published on 2010-03-11T12:23:04Z Indexed on 2010/03/18 13:41 UTC
Read the original article Hit count: 334

Filed under:
|

What would be the equivalant in MySQL for:

  1. Saving a command for later reuse.

    eg: alias command1='select count(*) from sometable;' Where then I simply type command 1 to get the count for SomeTable.

  2. Saving just a string, or rather part of a command.

    eg: select * from sometable where $complex_where_logic$ order by attr1 desc; WHere $complex_where_logic$ is something I wish to save and not have to keep writing out

© Stack Overflow or respective owner

Related posts about mysql

Related posts about mysql-query