4 messages in com.mysql.lists.mysqlRE: query question
FromSent OnAttachments
Susan Ator12 Jun 2003 10:22 
Mike Hillyer12 Jun 2003 10:34 
Jay Blanchard12 Jun 2003 10:34 
Susan Ator12 Jun 2003 11:02 
Subject:RE: query question
From:Mike Hillyer (mhil@rinax.com)
Date:06/12/2003 10:34:13 AM
List:com.mysql.lists.mysql

SELECT * FROM mytable WHERE LENGTH(phone) < 10;

http://www.mysql.com/doc/en/String_functions.html

-----Original Message----- From: Susan Ator [mailto:SAt@npr.org] Sent: Thursday, June 12, 2003 11:23 AM To: mys@lists.mysql.com Subject: query question

Is there a way to check if a field has x number of characters in it?

I have a table with a column (phone) which, for the moment is varchar(25). I need to find those entries which have less than 10 characters.

Can this be done?

Thanks

susan