I am trying to write an SQL Server stored procedure in PostgreSQL.
One of the statement is, INSERT INTO @TempTable EXEC(@DynamicQuery)
In SQL Server, @DynamicQuery executes and inserts result into @TempTable table variable. I am not finding similar option in PostgreSQL. Can somebody help with any hint please. Thanks.
create table as