BigQuery, MySQL, Spanner, and Sybase provide a bit_xor
aggregate function, which can run a bitwise XOR operation on all 64-bit integers in a group (from a GROUP BY
query).
How would I run an aggregate bitwise XOR in Microsoft SQL Server?
BigQuery, MySQL, Spanner, and Sybase provide a bit_xor
aggregate function, which can run a bitwise XOR operation on all 64-bit integers in a group (from a GROUP BY
query).
How would I run an aggregate bitwise XOR in Microsoft SQL Server?
The ^ bitwise operator in SQL Server performs a bitwise logical exclusive OR between the two expressions, taking each corresponding bit for both expressions.
Example:
SELECT a_int_value ^ b_int_value
FROM bitwise;
GO
For aggregate bitwise xor SQL Server does not have native support but you can create a function as below: