2014-04-11 84 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 )也 –

回答