Skip to content

MySQL Query for Selecting Based on Length of Field

by Jon on October 21st, 2009

Well I was trying to find some bad data in a dialer today so I needed to select based on the length of the phone number, here is a querry to do that. This basicly will find any records that contain more than 10 characters.

“SELECT * FROM table_name WHERE length( field_from_table ) >10″

From → Tech

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS

%d bloggers like this: