Mysql Not

Mysql Not is useful when you a perform Not Operation in SQL. The SQL query returns you 1 and 0, when !o and !1 are selected in the select query.

Mysql Not

Mysql Not

     

Mysql Not is useful when you a perform Not Operation in SQL. The SQL query returns you 1 and 0,  when !o and !1 are selected in the select query.

Understand with Example

The Tutorial illustrate an example from 'MySQL Not'. The Select Query !0 is used to return 1 and Query !1 returns you 0 respectively.

Query for Mysql not :

select !0 : The !0 in the select Query is used to return 1

 

mysql> select !0;
+----+
| !0 |
+----+
|  1 |
+----+
1 row in set (0.00 sec)

Another Query for Mysql not :

select !1: The !1 in the select Query is used to return 0.

mysql> select !1;
+----+
| !1 |
+----+
|  0 |
+----+
1 row in set (0.01 sec)