-- Collection of code snippets by Arne Vajhøj 
-- posted to eksperten.dk, usenet and other places (2002-now) 
DELIMITER //
CREATE PROCEDURE testsp()
BEGIN
    SELECT * FROM t1;
    SELECT * FROM t1;
    SELECT * FROM t1;
END//
DELIMITER ;
DELIMITER //
CREATE FUNCTION testudf(n INTEGER) RETURNS INTEGER
BEGIN
   RETURN n+1;
END//
DELIMITER ;
CALL testsp;
SELECT testudf(3);
DROP PROCEDURE testsp;
DROP FUNCTION testudf;
