Hello,
I am new to PostgreSQL and i would like to achieve the same result as a stored procedure in MSSQL returns.
In SQL i can return the output of the query with out defining any return type.
Eg: Create procedure mysp (table_name varchar(25)
as
begin
if table_name = 'Color'
select * from color;
end
if table_name='company'
select * from company;
End
Here there may be any number of columns in color and company tables.
i would like to achieve the same in postgre SQL by using functions. I believe Postgres do now support creating stored procedure as SQL.
Thanks in Advance