Search
 
SCRIPT & CODE EXAMPLE
 

SQL

XOR in SQL Server

SELECT name
    , population
    , area
FROM world
WHERE (area > 3000000 AND population <= 250000000)
OR (area <= 3000000 AND population > 250000000)
Comment

sql xor

A xor B = (not A and B) or (A and not B)


A B | f = notA and B | g = A and notB | f or g | A xor B    
----+----------------+----------------+--------+--------    
0 0 | 0              | 0              | 0      | 0    
0 1 | 1              | 0              | 1      | 1    
1 0 | 0              | 1              | 1      | 1    
1 1 | 0              | 0              | 0      | 0
Comment

PREVIOUS NEXT
Code Example
Sql :: cast in sql server 
Sql :: joint query 
Sql :: sql not operator 
Sql :: drop specific row postgresql 
Sql :: sql injection 
Sql :: how mysql store datetime 
Sql :: synonym oracle 
Sql :: what is 1=2 in sql 
Sql :: postgresql add not null and not empty constraint 
Sql :: oracle sql distinct vs unique 
Sql :: sql procedure 
Sql :: sql is not null 
Sql :: sql transaction 
Sql :: compare if is null sql 
Sql :: mac mysql this is incompatible with sql_mode=only_full_group_by 
Sql :: sql file in postgres with pgadmin 
Sql :: sql server enterprise 
Sql :: alter in mysql 
Sql :: insert update sql server 
Sql :: SQL Server dynamic pivot unknown number of columns 
Sql :: how to check rollback status in oracle 
Sql :: mysql and or 
Sql :: can we rollback data that are deleted using delete clause? 
Sql :: search all tables in a database for a value 
Sql :: create backup 
Sql :: mysql search like but first exact match 
Sql :: get statis values sql 
Sql :: sql fetch next 10 rows pdo 
Sql :: plsql select intop 
Sql :: BigQuery: join 2 tables but only choosing rows based on date column 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =