I was surprised when I run two statement in MySQL
SELECT *
FROM jobs
WHERE salary_max = 1000
AND
SELECT *
FROM jobs
WHERE salary_max = '1000'
I’ve just wonder that why MySQL can process text and number as the same, and it return same result. Can you explain for me about this?
MySQL automatically converts incompatible types in expressions to make them compatible. It’s discussed in the MySQL documentation.