chevron_left
Operators
0
0
0
new
MySQL | IS
Database
chevron_rightMySQL
chevron_rightDocumentation
chevron_rightOperators
schedule Jul 1, 2022
Last updated MySQL
Tags MySQL's IS
operator performs a test against a boolean value and returns 1 if the test evaluates to true, 0 otherwise.
NOTE
The boolean value can be one of: TRUE
, FALSE
, UNKNOWN
Syntax
SELECT value IS TRUE | FALSE | UNKNOWN;
Example
To check whether 'test'
is TRUE
:
SELECT 'test' IS TRUE;
+----------------+| 'test' IS TRUE |+----------------+| 0 |+----------------+
To check whether 1
is TRUE
:
SELECT 1 IS TRUE;
+-----------+| 1 IS TRUE |+-----------+| 1 |+-----------+
To check whether NULL
is UNKNOWN
:
SELECT NULL IS UNKNOWN;
+-----------------+| NULL IS UNKNOWN |+-----------------+| 1 |+-----------------+
Published by Arthur Yanagisawa
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...
Official MySQL Documentation
https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_is
0
0
0
Enjoy our search