select 名字字段 where len(名字字段) =3 from 查询的表。
select * from table where len(name) = 3;
select * from table where name like '___';
_(下划线) : 表示任意单个字符。匹配单个任意字符,它常用来限制表达式的字符长度语句:
比如 SELECT * FROM [user] WHERE u_name LIKE '_三_'
只找出“唐三藏”这样u_name为三个字且中间一个字是“三”的;
按照你的要求就应该是
SELECT * FROM [user] WHERE u_name LIKE '___' (单引号内3个下划线)。