Last active
August 29, 2015 14:00
-
-
Save kaichen/11280740 to your computer and use it in GitHub Desktop.
你好MySQL,再见MySQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT 'normal' = 0 #=> 1 | |
| SELECT 'disable' = 0 #=> 1 | |
| SELECT 'disable1' = 0 #=> 1 | |
| SELECT '1disable' = 0 #=> 0 | |
| SELECT '123456' = 0 #=> 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SELECT '1' + 1 # => 2
Apparently string is converted to number even if it's on the left side.
If both arguments in a comparison operation are strings, they are compared as strings...In all other cases, the arguments are compared as floating-point (real) numbers.