0% found this document useful (0 votes)
16 views4 pages

Maths Op

Uploaded by

anushkaanand2021
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views4 pages

Maths Op

Uploaded by

anushkaanand2021
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

maths operator

mysql> select 6='6gfh';


+----------+
| 6='6gfh' |
+----------+
| 1 |
+----------+
1 row in set, 1 warning (0.02 sec)

mysql> select '6'='6gfh';


+------------+
| '6'='6gfh' |
+------------+
| 0 |
+------------+
1 row in set (0.00 sec)

mysql> select 2.37=2.4;


+----------+
| 2.37=2.4 |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)

mysql> select 7<>7;


+------+
| 7<>7 |
+------+
| 0 |
+------+
1 row in set (0.00 sec)

mysql> select NULL <> NULL;


+--------------+
| NULL <> NULL |
+--------------+
| NULL |
+--------------+
1 row in set (0.00 sec)

mysql> select 0<> NULL;


+----------+
| 0<> NULL |
+----------+
| NULL |
+----------+
1 row in set (0.00 sec)

mysql> select 10 between 0 and 100;


+----------------------+
| 10 between 0 and 100 |
+----------------------+
| 1 |
+----------------------+
1 row in set (0.02 sec)

mysql> select 10,55,34,233 between 0 and 100;


+----+----+----+-----------------------+
| 10 | 55 | 34 | 233 between 0 and 100 |
+----+----+----+-----------------------+
| 10 | 55 | 34 | 0 |
+----+----+----+-----------------------+
1 row in set (0.00 sec)

mysql> select 10 between 0 and 9;


+--------------------+
| 10 between 0 and 9 |
+--------------------+
| 0 |
+--------------------+
1 row in set (0.00 sec)

mysql> select 'y' between 'x' and 'z';


+-------------------------+
| 'y' between 'x' and 'z' |
+-------------------------+
| 1 |
+-------------------------+
1 row in set (0.00 sec)

mysql> select 'y' between 'm' and 'p';


+-------------------------+
| 'y' between 'm' and 'p' |
+-------------------------+
| 0 |
+-------------------------+
1 row in set (0.00 sec)

mysql> select 7 IN (1,2,3,4,5,6,7,8,9);


+--------------------------+
| 7 IN (1,2,3,4,5,6,7,8,9) |
+--------------------------+
| 1 |
+--------------------------+
1 row in set (0.00 sec)

mysql> select 7=NULL;


+--------+
| 7=NULL |
+--------+
| NULL |
+--------+
1 row in set (0.00 sec)

mysql> select Null IN (1,Null,2,3,4,5,6,7,8,9);


+----------------------------------+
| Null IN (1,Null,2,3,4,5,6,7,8,9) |
+----------------------------------+
| NULL |
+----------------------------------+
1 row in set (0.02 sec)

mysql> select 'mysql' like '_sql';


+---------------------+
| 'mysql' like '_sql' |
+---------------------+
| 0 |
+---------------------+
1 row in set (0.02 sec)

mysql> select 'MySQL' like '_sql';


+---------------------+
| 'MySQL' like '_sql' |
+---------------------+
| 0 |
+---------------------+
1 row in set (0.00 sec)

mysql> select 'MySQL' like '__sql';


+----------------------+
| 'MySQL' like '__sql' |
+----------------------+
| 1 |
+----------------------+
1 row in set (0.00 sec)

mysql> select 'zero' REGEXP '^ero?';


+-----------------------+
| 'zero' REGEXP '^ero?' |
+-----------------------+
| 0 |
+-----------------------+
1 row in set (0.04 sec)

mysql> select 'zero' REGEXP '^zer?';


+-----------------------+
| 'zero' REGEXP '^zer?' |
+-----------------------+
| 1 |
+-----------------------+
1 row in set (0.00 sec)

mysql> select not 1;


+-------+
| not 1 |
+-------+
| 0 |
+-------+
1 row in set (0.00 sec)

mysql> select not 1,(2=2);


+-------+-------+
| not 1 | (2=2) |
+-------+-------+
| 0 | 1 |
+-------+-------+
1 row in set (0.00 sec)

mysql> select not 1,not (2=2);


+-------+-----------+
| not 1 | not (2=2) |
+-------+-----------+
| 0 | 0 |
+-------+-----------+
1 row in set (0.00 sec)

You might also like