Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example of three valued logic in SQL Server

Tags:

I understand that SQL uses three valued logic but I am having trouble understanding how to use this in practice, especially why TRUE || NULL = True and FALSE && NULL = False instead of evaluating to null.

Here are the three valued truth tables that apply to SQL Server:

Tri truth tables

I found a couple explanations of three valued logic online but I cannot find any real code examples of this in use. Can someone show me a code example using three valued logic to help me understand this a little better?