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

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

Regards,
Mike Hillyer
www.vbmysql.com


-----Original Message-----
From: Susan Ator [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 12, 2003 11:23 AM
To: [EMAIL PROTECTED]
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

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to