ex:insert into emps values(@a,'hhh')
Sqlserver 2008 insertion
Hi,i have a table with 2 columns.I want to insert values into table.For that one column value want to take from some variable and another value from another table.Is it possible to insert data like that?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Jignesh TrivediRank #16 · 50.3K reputationPosted Jan 7, 2013, 1:16 AM EST
yes it is possible
try...
Insert into table1 (val1,val2)
select @someValue, FieldName from table2
replace your value in above code
hope this will help you.