The following comparison produces a result that is correct in lexical terms but incorrect in temporal terms : RIGHT « String « SQL / MySQL






The following comparison produces a result that is correct in lexical terms but incorrect in temporal terms

      
mysql>
mysql>
mysql> SELECT RIGHT('1987-7-1',5) < RIGHT('1987-10-01',5);
+---------------------------------------------+
| RIGHT('1987-7-1',5) < RIGHT('1987-10-01',5) |
+---------------------------------------------+
|                                           0 |
+---------------------------------------------+
1 row in set (0.00 sec)

mysql>

   
    
    
    
    
    
  








Related examples in the same category

1.RIGHT(, )
2.Return just the MM-DD component of the date with RIGHT()
3.SELECT RIGHT('1995-03-01',5), RIGHT('1996-02-29',5);