Knowledge Walls
John Peter
Pune, Maharashtra, India
Function in Mysql of Code Template
3225 Views
Create Function
CREATE FUNCTION function_name (arguments)
RETURNS return_data_type
[ DETERMINISTIC | NOT DETERMINISTIC ]
BEGIN
    -- function statements
   RETURN data;
END
$$

-- DETERMINISTIC - returns same result for same input data.
-- NOT DETERMINISTIC - returns different result for same input data.
Show Function
-- To see source
SHOW CREATE FUNCTION function_name;

-- To show all functions
SHOW FUNCTION STATUS;
Delete Function
DROP FUNCTION function_name;
Or
DROP FUNCTION IF EXISTS function_name;
Previous Topics
Previous lessons of current book.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details