Within SQL, there is no requirement that an OR clause breaks early. In other words, it is up to the optimizer whether to check both conditions simutaneously. I am not an expert in the MSSQL optimizer, but I have seen instances where the optimizer has and has not short circuited an OR clause.
More Related Contents:
- Does query plan optimizer works well with joined/filtered table-valued functions?
- How do I create a unique constraint that also allows nulls?
- How do I get list of all tables in a database using TSQL?
- Get first day of week in SQL Server
- What is the significance of 1/1/1753 in SQL Server?
- Cannot truncate table because it is being referenced by a FOREIGN KEY constraint?
- Escape a string in SQL Server so that it is safe to use in LIKE expression
- Insert Update trigger how to determine if insert or update
- SQL time difference between two dates result in hh:mm:ss
- What is the best way to truncate a date in SQL Server?
- Dynamic SQL (passing table name as parameter)
- SQL Server: Difference between PARTITION BY and GROUP BY
- How do you truncate all tables in a database using TSQL?
- Understanding SQL Server LOCKS on SELECT queries
- SQL Server: How to select all days in a date range even if no data exists for some days
- SQL – The conversion of a varchar data type to a datetime data type resulted in an out-of-range value
- TSQL: How to convert local time to UTC? (SQL Server 2008)
- T-SQL Dynamic SQL and Temp Tables
- Find non-ASCII characters in varchar columns using SQL Server
- How can I determine in SQL Server if a dateTime range overlaps another
- How do you change the datatype of a column in SQL Server?
- SQL Server Query – groupwise multiplication
- Avoid Naming User Stored Procedures SP% or SP_%
- How do I select last 5 rows in a table without sorting?
- SELECT INTO a table variable in T-SQL
- T-SQL query to show table definition?
- How can I insert binary file data into a binary SQL field using a simple insert statement?
- Cannot find either column “dbo” or the user-defined function or aggregate “dbo.Splitfn”, or the name is ambiguous
- Include missing months in Group By query
- What are row, page and table locks? And when they are acquired?