-- Collection of code snippets by Arne Vajhøj 
-- (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and 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;
