3 ms·
SQL Server has had _autoparameterization_ opf queries for a while now: when you have multiple queries of the same general shape but with varying literal values,
by DaiPlusPlus 5y ago
SQL Server has had _autoparameterization_ opf queries for a while now: when you have multiple queries of the same general shape but with varying literal values, it automatically converts the literals to parameters (rather than vice-versa), and it's generally beneficial for performance because existing query-plans can be reused (instead of having to create a new plan for each literal value encountered): https://www.mssqltips.com/sqlservertip/2935/sql-server-simple-and-forced-parameterization/ https://www.mssqltips.com/sqlservertip/2935/sql-server-simpl...
- namibj 5y agoI didn't mean it that way. I mean you can combine SQL fragments, think multiple `ORDER BY` clauses.