sql - query to delete invalid mobile numbers from mysql database -


I have a mysql table that has 100K mobile number (India), but some of them are invalid mobile numbers. I want to remove all mobile numbers which are not really 10 digits and start with less than 7 digits. Can you help me with a SQL query for this?

You can do it in 2 simple delete.

  Delete length from your table (mobile number) & lt; & Gt; 10; Skip WHERE from your table (Mobile Number, 1) & lt; 7;  

or 1

  Delete length from your table (mobile number) & lt; & Gt; 10 or left (Mobile Number, 1) & lt; 7;  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -