I want to search phone numbers from users table, it has million user records. The Users table will have phone numbers with or without country code.
Sample phone numbers in User table
+911111122222
3333344444
+15555566666
+917777788888
+19999900000
The input phone numbers which I will pass, it may or may not have the country code. I will input 100 to 1000 phone numbers
1111122222
+913333344444
+15555566666
7777788888
9999900000
I want to retrieve all records which matches phone numbers in despite of country code.
Right now I am using this,
Select * from users WHERE phone_numer IN ("1111122222","+913333344444", "+15555566666", "7777788888", "9999900000");
It doesn't return all the phone numbers, how should we handle this?