我正在尋找SQL Server(T-SQL)中的XOR運算符或等效函數。我有這個在我的查詢:SQL Server中的XOR運算符
WHERE
CompanyInfo.INSTANCERELATIONTYPE = 41
AND (CompanyInfo.DATAAREA = @DataAreaId OR CompanyInfo.DATAAREA = @DataAreaIdDeflt)
我想將其更改爲
WHERE
CompanyInfo.INSTANCERELATIONTYPE = 41
AND (CompanyInfo.DATAAREA = @DataAreaId XOR CompanyInfo.DATAAREA = @DataAreaIdDeflt)
'選擇1^3 AS XorExample' – Rabbit