I have table with email field of type varchar.
select *
from `table_name`
WHERE email='some email'
working well for all the other email except one email in the table.
I have table with email field of type varchar.
select *
from `table_name`
WHERE email='some email'
working well for all the other email except one email in the table.
When this works for your problematic record
select * from table_name
where email like '%some email%'
Then you have leading or trailing spaces in your data.
To revert that update your existing table data like this
update table_name
set email = trim(email)
where email like '%some email%'
may be you have blankspace in your email. you can check the length of the email.
SELECT length(email)
FROM `table_name`
WHERE `email` LIKE '%email%'
use wildcard
select * from table_name
where email like '%some email%'
or visit here for more combination http://www.w3schools.com/sql/sql_wildcards.asp