The two strings '4200' and '4200.0' are not the same: : String Compare « String « SQL / MySQL






The two strings '4200' and '4200.0' are not the same:

      
mysql>
mysql> SELECT '4200' = '4200.0';
+-------------------+
| '4200' = '4200.0' |
+-------------------+
|                 0 |
+-------------------+
1 row in set (0.00 sec)

mysql>

   
    
    
    
    
    
  








Related examples in the same category

1.Compare String in where clause
2.String comparisons are performed from left to right, one character at a time:
3.Case-insensitive nature of string comparisons:
4.String comparisons in MySQL are not case sensitive by default:
5.To make a string comparison case sensitive, cast (convert) one of the strings to binary form by using the BINA
6.To make a string comparison not case sensitive, convert both strings to the same lettercase using UPPER( ) or
7.NULL values fail comparisons both with < and with >=