I have a stored procedure that executes a t-sql statement using sp_executesql. This t-sql code recompiles everytime it runs using "INSERT INTO" but when I use "INSERT" only it will not recompile. What is going on here?
create table #test (id int)
insert into #test select id from mytable
insert #test select id from mytable
SQL Server 2008
March 23, 2011 7:34 PM
March 24, 2011 11:42 PM