2014-04-11 82 views
0

我觉得这很难测试/研究,所以我问:在OR类似于where (1 = 1) OR (column1 = @value)条件,第二部分,例如:column1 = @value曾经被测试?如果可能的话,请提供文档...Sql Server比较行为

+1

它被称为短路,SQL Server不做*做。请参阅http://stackoverflow.com/questions/11219791/or-operator-short-circuit-in-sql-server和http://weblogs.sqlteam.com/jeffs/archive/2008/02/22/sql-server -short-circuit.aspx – LittleBobbyTables

+1

检查[此问题](http://dba.stackexchange.com/questions/5333/logical-operators-or-and-in-condition-and-order-of-conditions-in-where )也 –

回答