SQUARE in JS
Sample Source Pattern
Implementation of stored procedure
CREATE OR REPLACE FUNCTION square(exp float)
RETURNS float
LANGUAGE JAVASCRIPT
AS
$$
return Math.pow(exp, 2);
$$
;
SELECT SQUARE(16);SQUARE(16)|
----------+
256|Arguments
exp: Numeric expression to be raised.
Return Type
Float.
Last updated
Was this helpful?