what’s the criteria SQL server (2014) will automatically recompile a stored procedure which has table variables? Can someone explain what’s the criteria SQL server (2014) will automatically recompile a stored procedure which has table variables? I know there is criteria for statistics but how about a proc using table variable not the temp table?
Tables variables doesn't trigger recompile.
Well, they do, but not until SQL Server 2019 where they are treated as temp tables in this aspect.