Re: Get the schema name from inside a stored-procedure
I intend to call the stored procedure on MySQL startup to manage table data, but the databases I have are not pre-determined.
I think the real issue I have is that I need to access the information_schema.routines to find out in what databases I have created the stored procedure and then call the procedure against the database it is created in.
So I have to construct dynamic 'USE {database}' statement to change the current database before calling the procedure; but the dynamic USE statement is not allowed in MySQL.
As a workaround, I can pass in the database name to the procedure. It works, but just want to check if there's better ways to do it.
Subject
Views
Written By
Posted
4645
July 18, 2014 11:39AM
1714
July 19, 2014 09:19AM
1830
July 19, 2014 12:16PM
Re: Get the schema name from inside a stored-procedure
1908
July 20, 2014 05:45PM
1506
July 20, 2014 07:42PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.