I would like to write a stored procedure that gets database name as parameter and use this parameter inside the procedure:
i.e. SELECT a from param_db.table1
It seems that I can't use a parameter instead of the db name. Is there a work around?
How can I choose the db according to procedure parameter?
|