POW in JS
Description
Sample Source Pattern
Syntax
Math.pow( base, exp )Arguments
Return Type
Examples
CREATE OR REPLACE FUNCTION compute_pow(base float, exp float)
RETURNS float
LANGUAGE JAVASCRIPT
AS
$$
return Math.pow(BASE, EXP);
$$
;
SELECT COMPUTE_POW(2, 3);COMPUTE_POW(2, 3)|
-----------------+
8|Last updated
Was this helpful?