Reputation: 28742
If I create function in mysql, does it only live as long as the connection lasts? Which connection, the query connection or the DB connection? Or does it get saved somewhere so you can call it anytime from any connection to that DB?
Upvotes: 0
Views: 61
Reputation: 24134
Functions, once created using the CREATE FUNCTION construct, live in the DBMS until they are explicitly dropped, using the DROP FUNCTION <function name>
. So, their life span is beyond the DB/query connection used for creating them.
Upvotes: 1