Create a User Defined Function in MySql

55
Views
1
Answers

How to Create a User Defined Function in MySql?

edit | flag
William Patrick
Asked on: Jul 23, 2011 at 1:12AM

1 Answers

49
3
49

Try this..
For Creating User defined functions..

CREATE FUNCTION hello (s CHAR(20))
 RETURNS CHAR
(50) DETERMINISTIC
 RETURN CONCAT
('Hello, ',s,'!');

Call the Function..

 SELECT hello('world');

Result:

Hello, world!
edit | flag
Gokul A
Answered on: Jul 23, 2011 at 1:19AM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags