MySQL Forums
Forum List  »  UDF

Access database name in UDF
Posted by: Franco Califano
Date: May 23, 2012 10:07AM

Hi all.
I have a simple question but googling I can't find any solution.
I need to extract the database name inside an UDF function written in C.
When I call an UDF function, I'm using a db:

USE my_db;
SELECT my_func();

Inside my_func (code C) I need to extract the value my_db.
Passing db_name to my_func is the only way (ex: select my_func(select database()) )?

Thank you.

Options: ReplyQuote

Written By
Access database name in UDF
May 23, 2012 10:07AM

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.