How To Enter Boolean Values in SQL Statements

Q

How To Enter Boolean Values in SQL Statements? - MySQL FAQs - Introduction to SQL Basics

✍: FYIcenter.com

A

If you want to enter Boolean values in SQL statements, you use (TRUE), (FALSE), (true), or (false). Here are some good examples:

SELECT TRUE, true, FALSE, false FROM DUAL;
+------+------+-------+-------+
| TRUE | TRUE | FALSE | FALSE |
+------+------+-------+-------+
|    1 |    1 |     0 |     0 |
+------+------+-------+-------+

2007-05-11, 8969👍, 0💬