CREATE OR REPLACE PROCEDURE dbo.test()
RETURNS varchar null
LANGUAGE JAVASCRIPT
execute as caller
AS
$$
set MY_VAR =1;
return $MY_VAR;
$$
;
If I execute as below I am facing the error . Message as shown below call dbo.test();
//ERROR: JavaScript compilation error: Uncaught SyntaxError: Unexpected identifier in TEST at 'set MY_VAR =1;' position 4