MySQL comparison operator, spaces

后端 未结 5 723
再見小時候
再見小時候 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-12 00:03

    The trailing spaces are omitted if the column is of type char or varchar; using like 'usa ' resolves the issue

提交回复
热议问题