July 19, 2010 at 8:08 am
Hi..
We can fetch the same result by using !<(Not Less than) or >=(Greater than or equal to).
In the same way,
we can fetch the same result by using !>(Not Greater than) or <=(Less than or equal to).
Then what is the use of introducing both the operators...???
[font="Comic Sans MS"]Praveen Goud[/font]
July 19, 2010 at 8:16 am
Praveen Goud Kotha (7/19/2010)
...Then what is the use of introducing both the operators...???
...
It is matter of preference...
July 19, 2010 at 10:21 am
Joe Celko (7/19/2010)
History. Sybase was written in C on UNIX decades ago. The use of ! and % in SQL is not standard and looks awful
"!=" it is sure not-ISO standard, but many developers use it, I guess as it is very common in the programming languages (eg. C# etc.)
I have a different taste... so, there are many other symbols or combination of them which look yeuky in SQL, you can easely argue what looks more or less awful 😀
As long as you code is nicely formatted and its style is consitent, it is no much difference of what you use. It's fully up to you.
July 20, 2010 at 1:34 am
Hi..
Can any one say....which of the above operators are preferable when it comes to the Optimization point of view..
[font="Comic Sans MS"]Praveen Goud[/font]
July 20, 2010 at 1:38 am
No difference, !< is translated to be >= by the engine. Try both and have a look at the predicates in the execution plan
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply