I have this table(students):
id | name | address
1 | hello | test451.1
2 | hello | test461.1
I want to select the rows that contain 451 in the address field exact before decimal and after alphabet string. Basically I want to filter 451 from address values. I am using the following query to get integer out of string.
SELECT * FROM `students` WHERE CAST(`address` AS UNSIGNED) = '451'
I still have no idea how to filter for a float.
Also tried this but didn't work :
SELECT * FROM `students` WHERE CAST(`address` AS DECIMAL(4,1)) = '451'
I can't use like %451% because there are other rows with test4451.1, test 5441.1 etc. I don't want to select them.