Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the use of "&" operator in SQL SERVER

What is the use of & operator in the code specified below. IS there any benefit of using & instead of "AND". Please elaborate.

CASE ( C.[Status] & F.[Status] & D.[Status] & DWT.[Status] & P.[Status] )
    WHEN 1
        THEN CASE ( C.IsDeleted & F.IsDeleted & D.IsDeleted & P.IsDeleted )
        WHEN 0 THEN NULL
        ELSE 7
        END
    ELSE 6
END
like image 309
Rohit Raghuvansi Avatar asked Aug 11 '10 12:08

Rohit Raghuvansi


People also ask

What is the use of of?

Of is a preposition. Of commonly introduces prepositional phrases which are complements of nouns, creating the pattern: noun + of + noun. This pattern is very common, especially to indicate different parts, pieces, amounts and groups: Lima is the capital of Peru.

What's the use of examples?

Examples help you clarify complex concepts, even in regulations. They are an ideal way to help your readers. In spoken English, when you ask for clarification of something, people often respond by giving you an example. Good examples can substitute for long explanations.

What's the use def?

Definition of what's the use —used to say that it would not be useful to do something "You should talk to her." "What's the use? She's not going to change her mind." —often + of What's the use of trying? It won't help.

What is the use of you?

the pronoun of the second person singular or plural, used of the person or persons being addressed, in the nominative or objective case: You are the highest bidder. It is you who are to blame. We can't help you. This package came for you.


1 Answers

& is bit AND operation:

  • & Bitwise AND

  • | Bitwise OR

  • ^ Bitwise exclusive OR

  • ~ Bitwise NOT

like image 104
Michael Pakhantsov Avatar answered Oct 30 '22 03:10

Michael Pakhantsov