Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Instead of OR in WHERE clause
Message
From
03/02/2014 23:00:12
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01593065
Message ID:
01593075
Views:
32
>This query
>
>select * from myTable where Condition1 OR Condition2
>
>is the same as
>
>select * from myTable where Condition1
>UNION
>select * from myTable where Condition2
Is it really faster?

Also, we need to consider that the select line is very big. So, if I have 1000 primary keys, I would have to repeat that line 1000 times.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform