Show procedure definition in MySQL
SHOW CREATE PROCEDURE <name> Returns the text of a previously defined stored procedure that was created using the CREATE PROCEDURE statement. Swap PROCEDURE for FUNCTION for a stored function.
SHOW CREATE PROCEDURE <name> Returns the text of a previously defined stored procedure that was created using the CREATE PROCEDURE statement. Swap PROCEDURE for FUNCTION for a stored function.
The difference is- A function must return a value (of any type) by default definition of it, whereas in case of a procedure you need to use parameters like OUT or IN OUT parameters to get the results. You can use a function in a normal SQL where as you cannot use a procedure in … Read more
SHOW CREATE PROCEDURE <name> Returns the text of a previously defined stored procedure that was created using the CREATE PROCEDURE statement. Swap PROCEDURE for FUNCTION for a stored function.
I find UDFs are very handy and I use them all the time. I’m not sure what Microsoft’s rationale is for not including a sys.functions equivalent in SQL Server 2005 (or SQL Server 2008, as far as I can tell), but it’s easy enough to roll your own: CREATE VIEW my_sys_functions_equivalent AS SELECT * FROM … Read more