SQL Reference





  • Replication




data/ref
I want to... ...delete a column
Parameter Sniffing
1. replace parameters with local variables
2. WITH RECOMPILE

SET STATISTICS IO ON
SET STATISTICS IO OFF
----------------------
ORDER BY 
    case when (@Condition1 = 1) then Column1 end,
    case when (@Condition1 = 2) then Column2 end desc
----------------------
* nolock
* parameter sniffing
* indexes
* refactoring
* API tables
----------------------
* left join is safe only if the RHS has unique records. Otherwise the LHS will repeat.
----------------------
DDL   Data Definition Language       create table, alter table
DML   Data Manipulation Language     CRUD
DCL   Data Control Language
TCL   Transaction Control Language
----------------------