sql - MYSQL: clause where comparison Integer value -
this question has answer here:
- strict matching of strings , integers 2 answers
i've got column int when request select clause id='1fr2' example, mysql return true record id=1 seems mysql ignore or convert ? solution force mysql not trim ? thanks.
this because of mysql converts string integer. takes first number(s) , truncate other string. solution cast id
char first this:
where cast(id char)='1fr2'
Comments
Post a Comment