I want to create a simple MySQL function, I have this MySQL procedure:
CREATE PROCEDURE getUser(gU INT)
SELECT * FROM Company
WHERE id_number = gU;
CALL getUser(2);
I need some help making this into a MySQL function. What are the pros and cons of using a function over a procedure?
this is a mysql function example. I hope it helps. (I have not tested it yet, but should work)