1 CREATE FUNCTION function-name ( 2? 2+ , 2 parameter-declaration 3 ) RETURNS data-type2 4 LANGUAGE SQL option-list 5? SET OPTION-statement 6 SQL-routine-body parameter-declaration: 1 parameter-name data-type1 data-type: 1 built-in-type 1 distinct-type-name