Why isn't my BEGIN command working on SQL – Postgresql
I have this code to create a function. But it tells me the command in BEGIN is wrong CREATE FUNCTION transform_activebool(activebool CHAR(1)) RETURNS VARCHAR(10) BEGIN IF activebool = 't' THEN RETURN 'Active'; ELSE RETURN 'Inactive'; END IF; END; Code error…