Tschallacka
Tschallacka

Reputation: 28742

Does a function in mysql only live as long as the connection?

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

Answers (1)

Vikdor
Vikdor

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

Related Questions