Mysql notes

1、By default, Mysql compares strings in a case-insensitive manner, and if you want to make case-insensitive comparisons, you can add the Binary keyword, which means that strings are handled binarily. When comparing operations on strings, MySql will distinguish the size of strings.Write.

For example:

2、When a number and a string are operated on, the string is converted to a number according to certain rules. If the first bit of the string and several consecutive digits after it are numbers, it is converted to the value of the number, otherwise, it is converted to 0.

For example:

 

Leave a Reply

Your email address will not be published. Required fields are marked *