Sat May 24 11:32:14 EDT 2014

Parameterize over tables?

Is it possible in MySQL to parameterize something over a table?
I.e. have a table refer to another table in a field, then use that
name to perform a (generic) query in the table?

This is a bit like duck typing inheritance.

Is it possible?

Is it avoidable?

It seems possible using EXEC[1] or EXECUTE[2] in MySQL.  And probably
opens up a can of worms...

[1] http://www.techrepublic.com/forums/questions/doing-an-indirect-sql-select/#.
[2] http://dev.mysql.com/doc/refman/5.1/en/execute.html