Created
January 3, 2011 09:06
-
-
Save mariuz/763284 to your computer and use it in GitHub Desktop.
testing select from boolean columns in firebird 3.0 http://asfernandes.blogspot.com/2010/12/introducing-boolean-datatype.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check what values we have | |
SQL> SELECT * from true_values; | |
COLUMN_ONE COLUMN_TWO | |
========== ========== | |
<false> <false> | |
<true> <false> | |
<true> <false> | |
<false> <true> | |
<false> <true> | |
<true> <true> | |
--Check the disjunction (Logical or ) | |
--http://en.wikipedia.org/wiki/Truth_table#Logical_disjunction | |
SQL> SELECT column_one or column_two from true_values; | |
======= | |
<false> | |
<true> | |
<true> | |
<true> | |
<true> | |
<true> | |
--Check the conjunction (Logical and) | |
--http://en.wikipedia.org/wiki/Truth_table#Logical_conjunction | |
SQL> SELECT column_one and column_two from true_values; | |
======= | |
<false> | |
<false> | |
<false> | |
<false> | |
<false> | |
<true> | |
--Check the negation | |
-- | |
SQL> select not(column_one) from true_values; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Creating a “truth table” is not hard, you can use an useful tool (CKod, at http://ckod.sourceforge.net/_/) to make a “truth table”.
Good luck to you!