- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
While adding the numbers contained in quotes, how MySQL evaluates if we write non-numeric text between numbers of a string?
Suppose if we are trying to add the numbers having non-numeric text between numbers of a string, then MySQL simply use the first number of that string to evaluate the addition along with a warning. Following example will exhibit this −
Example
mysql> Select '1525 * 2' + '200'As Total; +-------+ | Total | +-------+ | 1725 | +-------+ 1 row in set, 1 warning (0.00 sec)
From the above query, it is clear that MySQL uses only first number i.e. 1525 for evaluating the addition and ignores the non-numeric text.
Advertisements