Talking about mysql which can have nvl functions similar to oracle, oraclenvl
Use ifnull instead of isnull
Isnull is used to determine whether it is null. If the returned value is 1, it indicates null or 0, it indicates not null.
Ifnull is equivalent to the nvl of oracle. Its usage is as follows:
Mysql> select ifnull (1, 10 );
+ -------------- +
| Ifnull (1, 10) |
+ -------------- +
| 1 |
+ -------------- +
1 row in set (0.00 sec)
Mysql> select ifnull (null, 10 );
+ ----------------- +
| Ifnull (null, 10) |
+ ----------------- +
| 10 |
+ ----------------- +
1 row in set (0.00 sec)
Isnull is used as follows:
Mysql> select isnull (null );
+ -------------- +
| Isnull (null) |
+ -------------- +
| 1 |
+ -------------- +
1 row in set (0.00 sec)
Mysql> select isnull (1 );
+ ----------- +
| Isnull (1) |
+ ----------- +
| 0 |
+ ----------- +
1 row in set (0.00 sec)
In the above discussion, mysql can have all the content shared with you by the nvl function similar to oracle. I hope to give you a reference and support for the customer's house.