- SQL Server中的语法
SET @InnerQuery = @InnerQuery + N'SELECT * from [' + @TableName + '] UNION ALL';
- 这里我在plpgsql中尝试上面的查询。
innerquery:= innerquery UNION ALL select * from '%',TableName; --Not in working state
答案 0 :(得分:0)
试试这个:
execute innerQuery || ' union all select * from "'
|| tableName || '"';