Create or replace function Test(strTable in text) return bigint as
$$
declare
intSum bigint;
begin
intSum:=(Select sum(salary) from strTable);
return intSum;
end;
$$
language plpgsql;
select Test('Employee' );
I want to pass Table name as a argument into function and execute select statement on this table
I run this function error is occure
$$
declare
intSum bigint;
begin
intSum:=(Select sum(salary) from strTable);
return intSum;
end;
$$
language plpgsql;
select Test('Employee' );
I want to pass Table name as a argument into function and execute select statement on this table
I run this function error is occure
Comment