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 :: get only first row mysql 
Sql :: like sql 
Sql :: mysql incrementation 
Sql :: How to get todays date and current time in mysql 
Sql :: uppercase and lowercase in sql 
Sql :: SQL SERVER SELECT BETWEEN DATETIME 
Sql :: cast to float with .2 sql 
Sql :: sql create table if not exists 
Sql :: wordpress print query sql 
Sql :: node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.13/node-v72-win32-x64.tar.gz 
Sql :: zsh: command not found: mysql mamp 
Sql :: show columns in sql 
Sql :: SQL: merging multiple row data in string 
Sql :: mysql docker compose 
Sql :: drop foreign key mysql 
Sql :: postgresql left join distinct on 
Sql :: pl sql disable trigger 
Sql :: mysql check if not null 
Sql :: find duplicate keys in mysql 
Sql :: how to get id of last inserted row in mysql 
Sql :: get comma separated values in sql server 
Sql :: SQLSTATE[IMSSP]: The active result for the query contains no fields. 
Sql :: how to get nearest location in mysql with latitude and longitude 
Sql :: update mongodb version ubuntu 
Sql :: copy table postgres 
Sql :: print year of a date sql 
Sql :: How to check event scheduler status mysql 
Sql :: run sql command line download for windows 10 
Sql :: cursor.execute in python sqlite3 
Sql :: username sql 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =