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?
Jignesh TrivediPosted Jan 7, 2013, 6:16 AM
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.