While adding the numbers contained in quotes, how MySQL evaluates if we write non-numeric text after a number?

Suppose if we are trying to add the numbers having non-numeric text after them, then MySQL simply discard the non-numeric text and evaluates the addition of numeric values along with warnings. Following example will exhibit this −


mysql> Select '1525 Kg' + '200 Oz'As Total;
| Total |
| 1725  |
1 row in set, 2 warnings (0.00 sec)

Updated on: 20-Jun-2020


Kickstart Your Career

Get certified by completing the course

Get Started