Entering Boolean Values in MySQL

Q

How To Enter Boolean Values in SQL Statements in MySQL?

✍: 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 |
+------+------+-------+-------+

 

What Is NULL Value in MySQL

Entering Binary Numbers in MySQL

Introduction to SQL Basics in MySQL

⇑⇑ MySQL Database Tutorials

2018-03-31, 1593🔥, 0💬