Syntax\n------\n\nCREATE\n    [ OR REPLACE]\n    [DEFINER = { user | CURRENT_USER | role | CURRENT_ROLE }]\n    PACKAGE [ IF NOT EXISTS ]\n    [ db_name . ] package_name\n    [ package_characteristic ... ]\n    [ package_specification_element ... ]\nEND\n\npackage_characteristic:\n    COMMENT 'string'\n  | SQL SECURITY { DEFINER | INVOKER }\n\npackage_specification_element:\n    FUNCTION_SYM package_specification_function ;\n  | PROCEDURE_SYM package_specification_procedure ;\n\npackage_specification_function:\n    func_name [ ( func_param [, func_param]... ) ]\n    RETURNS type\n    [ package_routine_characteristic... ]\n\npackage_specification_procedure:\n    proc_name [ ( proc_param [, proc_param]... ) ]\n    [ package_routine_characteristic... ]\n\nfunc_param:\n    param_name [ IN | OUT | INOUT | IN OUT ] type\n\nproc_param:\n    param_name [ IN | OUT | INOUT | IN OUT ] type\n\ntype:\n    Any valid MariaDB explicit or anchored data type\n\npackage_routine_characteristic:\n      COMMENT  'string'\n    | LANGUAGE SQL\n    | { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }\n    | SQL SECURITY { DEFINER | INVOKER }\n\nDescription\n-----------\n\nCREATE PACKAGE creates the specification for a stored package (a collection of logically related stored objects). A stored package specification declares public routines (procedures and functions) of the package, but does not implement these routines.\n\nA package whose specification was created by the CREATE PACKAGE statement, should later be implemented using the CREATE PACKAGE BODY statement.\n\nFunction parameter quantifiers IN | OUT | INOUT | IN OUT\n\nMariaDB starting with 10.8.0\n\nThe function parameter quantifiers for IN, OUT, INOUT, and IN OUT are supported anywhere.\n\nThe function parameter quantifiers for IN, OUT, INOUT, and IN OUT are supported only in procedures.\n\nOUT, INOUT and its equivalent IN OUT, are only valid if called from SET and not SELECT. These quantifiers are especially useful for creating functions and procedures with more than one return value. This allows functions and procedures to be more complex and nested.\n\nExamples\n--------\n\nSET sql_mode=ORACLE; # unnecessary from MariaDB 11.4\nDELIMITER $$\nCREATE OR REPLACE PACKAGE employee_tools AS\n  FUNCTION getSalary(eid INT) RETURN DECIMAL(10,2);\n  PROCEDURE raiseSalary(eid INT, amount DECIMAL(10,2));\n  PROCEDURE raiseSalaryStd(eid INT);\n  PROCEDURE hire(ename TEXT, esalary DECIMAL(10,2));\nEND;\n$$\nDELIMITER ;\n\nURL: https://mariadb.com/docs/server/reference/sql-statements/data-definition/create/create-package