1

This is probably server settings but if I have a table with column ID: ID 12000

and I run this query

Select * from myTable where ID = "12000"

I get the row. My problem is that if I run

Select * from myTable where ID = "12000anystring" 

returns the same row....

Can I force the server not to allow it. (happens both in mysql and mariadb)

Dani
  • 14,639
  • 11
  • 62
  • 110
  • Please share the table structure and sample data, such that this question contains a reproducable example of that problem – Nico Haase Mar 23 '20 at 06:46
  • Additionally, have a look at https://stackoverflow.com/questions/21762075/mysql-automatically-cast-convert-a-string-to-a-number – Nico Haase Mar 23 '20 at 06:46

0 Answers0