What's the difference between the operators 'AND' and '&'? Likewise,
what's the difference between the operators 'OR' and '|'?
Thanks,
ArpanHi
I think Books online explains this well enough!
AND and OR return TRUE or FALSE for boolean expressions
& and | are bitwise operators and are used on expressions.
John
"Arpan" wrote:
> What's the difference between the operators 'AND' and '&'? Likewise,
> what's the difference between the operators 'OR' and '|'?
> Thanks,
> Arpan
>|||Arpan,
AND, OR and NOT are logical operators returning a logical result. Since SQL
Server doesn't support a Boolean datatype, the expressions result cannot be
stored in a variable or a column, rather it must appear where an expression
is expected. e.g., IF, CASE, ON, WHERE, HAVING.
&, |, ^ and ~ are bitwise operators operating on a bit by bit basis given
integer inputs (or inputs implicitly converted to integers). The result of a
bitwise operation is an integer. Typically this are used for bitmap
manipulation where the bitmap contains multiple "flags," each of which
represents something that has two states.
BG, SQL Server MVP
www.SolidQualityLearning.com
"Arpan" <arpan_de@.hotmail.com> wrote in message
news:1124009232.588624.117630@.g44g2000cwa.googlegroups.com...
> What's the difference between the operators 'AND' and '&'? Likewise,
> what's the difference between the operators 'OR' and '|'?
> Thanks,
> Arpan
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment