How to find where Mysql functions are used
P粉573943755
P粉573943755 2023-08-18 16:46:18
0
2
503
<p>I am using Mysql 8. In one of the views I'm working on, there is a function called <code>calculateGP</code>. I want to modify this function but I'm not sure if this function is used elsewhere in the database. Is there a query that would let me know if this function is referenced elsewhere in the database? </p>
P粉573943755
P粉573943755

reply all(2)
P粉346326040

By taking a MySQL structure dump of the database and doing a text search on the dump file, I was able to find a reference to the function calculateGP. This is an alternative way to find references in the database without running a MySQL query.

P粉378890106

I will do this:

SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.VIEWS
WHERE VIEW_DEFINITION LIKE '%`calculateGP`%'

If your table, column, or other identifier is also named calculateGP, this may find the wrong match.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template