Home >Database >Mysql Tutorial >If I try to add two numbers enclosed in quotes, how does MySQL calculate it?
If we try to add two numbers contained in quotes, it means we are treating the string as a number. In this case, MySQL converts the value to the nearest numeric value and evaluates the result. The following example demonstrates this.
mysql> Select '1525' + '200'As Total; +-------+ | Total | +-------+ | 1725 | +-------+ 1 row in set (0.00 sec)
The above is the detailed content of If I try to add two numbers enclosed in quotes, how does MySQL calculate it?. For more information, please follow other related articles on the PHP Chinese website!