Logical ports in SQL

5

Is there a command that represents the XNOR or NOR logical port in SQL? Something that for example denies the XOR output

    
asked by anonymous 12.06.2015 / 21:14

2 answers

5

SQL ANSI '92

Operação                Modelo
XOR                     (a != b)
XNOR                    (a == b)
bitwise XOR             (a OR b) AND NOT (a AND b)
bitwise XNOR            NOT ((a OR b) AND NOT (a AND b))

XOR (or exclusive OR) is the difference operator; XNOR, that of equality. Thus, direct operations can be simplified.

Microsoft (Transact-SQL), Oracle (PL-SQL)

Operação    Operador    Modelo
XOR         ^           @a ^ @b
XNOR        ^ ^1        @a ^ @b ^ 1

The two SGDBs share the same symbol for the logical operator XOR ( ^ ).

Source:

^ (Bitwise Exclusive OR) (Transact-SQL)

    
12.06.2015 / 21:57
3
___ erkimt ___ Logical ports in SQL ______ qstntxt ___

Is there a command that represents the XNOR or NOR logical port in SQL? Something that for example denies the XOR output

    
______ azszpr69031 ___

SQL ANSI '92

A XOR B = (((NOT A) AND B) OR (A AND (NOT B)) 

XOR (or exclusive OR) is the difference operator; XNOR, that of equality. Thus, direct operations can be simplified.

Microsoft (Transact-SQL), Oracle (PL-SQL)

A XNOR B = ((A OR (NOT B)) AND ((NOT A) AND B))

The two SGDBs share the same symbol for the logical operator XOR ( A XOR B = (A' E B) OU (A E B') ).

Source:

^ (Bitwise Exclusive OR) (Transact-SQL)

    
______ ___ azszpr69020

You can create the function. If two variables (A and B) is only you obey the law ' % where% A XNOR B = (A' OU B) E (A OU B') symbolizes the denial. Filmography To do XNOR, just deny XOR or use %code%

In SQL would be

A XOR B = (((NOT A) AND B) OR (A AND (NOT B)) 

and

A XNOR B = ((A OR (NOT B)) AND ((NOT A) AND B))
    
___
12.06.2015 / 21:23