I want to pass variables as columns in a Table Variable.
DECLARE @VAR1 NVARCHAR(MAX)
DECLARE @VAR2 NVARCHAR(MAX)
and I have set values in these variables. Now I want to form a table from these results.
This is what I have tried
DECLARE @Query TABLE(@Pvar1,@Total)
Desired output:
Var1 Var2
abc xyz