Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql server set column name as variable

declare @a as varchar;
set @a='TEST'
exec ('select ' + @a + ' from x')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #server #set #column #variable
ADD COMMENT
Topic
Name
2+3 =