I have check unique value in the column VariantSKU using this sql code
alter Proc spIsUnique
@columnname nvarchar(max),
@tablename nvarchar(max)
As
Begin
EXEC ('select '+@columnname+',
IIf (count(*)>1,''False'',''True'') as Total
from '+@tablename+'
group by '+@columnname)
End
As you can see new column Total which contain True or False.. Now I want to add this column into the table in database. USing function it was not possible so I have created new table exactly same data called "Result" table.How can I add that column Total in Result table. How can I do it?