MySQL Programming Question:
Download Job Interview Questions and Answers PDF
How To Enter Boolean Values in SQL Statements?
Answer:
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;
<pre>+------+------+-------+-------+
| TRUE | TRUE | FALSE | FALSE |
+------+------+-------+-------+
| 1 | 1 | 0 | 0 |
+------+------+-------+-------+</pre>
SELECT TRUE, true, FALSE, false FROM DUAL;
<pre>+------+------+-------+-------+
| TRUE | TRUE | FALSE | FALSE |
+------+------+-------+-------+
| 1 | 1 | 0 | 0 |
+------+------+-------+-------+</pre>
Download MySQL Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
How To Enter Binary Numbers in SQL Statements? | What Are NULL Values? |