I am writing function in PostgreSQL but it doesn't allow me to declare variable inside it. Here is the function.
CREATE FUNCTION clean_emp() RETURNS void AS
$func$
DECLARE cnt varchar;
$func$ LANGUAGE SQL;
Error Message ERROR: syntax error at or near "varchar" SQL state: 42601 Character: 66