MySQL comparison operator, spaces

后端 未结 5 695
再見小時候
再見小時候 2021-01-11 23:04

If the database row is like this: country = \'usa\' and i query \"select * from data where country = \'usa \'\" it also returns this row. So its no

5条回答
  •  一整个雨季
    2021-01-11 23:44

    The trailing spaces are omitted if the column is of type char or varchar,

    Can read more on it on following link:

    http://blogs.agilefaqs.com/2011/06/22/trailing-white-spaces-are-ignored-by-mysql-for-comparison-in-a-select-statement/

提交回复
热议问题