There is a bitwise XOR operator – the caret (^), i.e. for:
SELECT 170 ^ 75
The result is 225.
For logical XOR, use the ANY keyword and NOT ALL, i.e.
WHERE 5 > ANY (SELECT foo) AND NOT (5 > ALL (SELECT foo))
More Related Contents:
- SQL Server – error when creating stored procedure
- How can foreign key constraints be temporarily disabled using T-SQL?
- How can I escape square brackets in a LIKE clause?
- Does T-SQL have an aggregate function to concatenate strings? [duplicate]
- Datatype for storing ip address in SQL Server
- Is there a way to loop through a table variable in TSQL without using a cursor?
- Maximum size of a varchar(max) variable
- best way to convert and validate a date string
- How to get a date in YYYY-MM-DD format from a TSQL datetime field?
- How do I format a number with commas in T-SQL?
- Is there a way to simplify a NULL compare of 2 values
- TSQL Try / Catch within Transaction or vice versa?
- What is the maximum number of characters that nvarchar(MAX) will hold?
- TSQL: Create a view that accesses multiple databases
- Sequence as default value for a column
- Aggregate bitwise-OR in a subquery
- How do I flush the PRINT buffer in TSQL?
- Get ROWS as COLUMNS (SQL Server dynamic PIVOT query)
- OR Operator Short-circuit in SQL Server
- How to change default language for SQL Server?
- T-SQL incrementing counter based on change in a column value
- Cannot bulk load. Operating system error code 5 (Access is denied.)
- Instead of trigger in SQL Server loses SCOPE_IDENTITY?
- Does query plan optimizer works well with joined/filtered table-valued functions?
- comma delimited list as a single string, T-SQL [duplicate]
- SQL SERVER – Understanding how MIN(text) works
- Pivot multiple columns based on one column in SQL Server
- @@ERROR and/or TRY – CATCH
- INSERT INTO @TABLE EXEC @query with SQL Server 2000
- How to calculate difference in hours (decimal) between two dates in SQL Server?