Takes n bit arrays and returns a bitwise exclusive OR-ing of its arguments using the following logic: for each bit compared, if there are an odd number of arguments with set bits (odd parity), return 1; otherwise, return 0.
BIT_XOR( bit-expression )
bit-expression The expression for which the value is to be determined. This is commonly a column name.
SQL/2003 Vendor extension.
Suppose you have the following table, t, containing a single column, a, which is a VARBIT data type.
a |
---|
0001 |
0111 |
0100 |
0011 |
You want to know the XOR value for the column. You enter the following SELECT statement, which returns 0001:
SELECT BIT_XOR( a ) FROM t; |
This result is determined as follows:
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |