I have a table with column name LIST_CODE where data like this A101,A102,B101.
How can I find all the data where LIST_CODE equal A102 OR B101
I try bellow sql but it returns 0
SELECT count(*) FROM details_user WHERE list_code IN ('A102','C101')
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you mean that list_code can contain ‘A101, A102,B101’ in one row then
But this would be a bad database design.
if list_code can contain
(one value per row)
Then your code is correct, and it’s just mean that you have no row with A102 or C101.