数据库查询问题 应该会用到存储过程吧.或者你选择数据后,用PHP进行筛选,也可以! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可能要麻烦一点,试试:select num,max(length(num)) as len from table where num like '001%' group by num order by len desc limit 1 SELECT num FROM table WHERE num LIKE '001%'GROUP BY length(num) order by length(num) desc limit 1 SELECT num FROM table WHERE num LIKE '001%' order by length(num) desc limit 1再问一下,能把group by 去掉吗? group by 这个意义重大 你最好看看相关文章我的理解不完全 怕误导你而且 明白 group by 很有意义 恩统一楼上,不能去掉group by,意义重大。还想继续问下,怎么查找以001开头的长度为六位的数据呢?比如 4 e 001001 5 f 001002 9 u 001003 select num from table where num like '001%' and length(num)=6; select num,length(num) as len from table where num like '001%' order by len desc limit 1这样不行吗? win8 R2下面 file_get_contents 失效 关于php清除缓存的脚本 xp下配置iis+php+mysql的问题! 验证码的刷新问题 开发右键菜单用什么技术? php soap-error Parsing WSDL:couldn't load from 请ustb(偶然)进来拿分 难道PHP就总是难登大雅之堂吗?参与者有分! 关于COOKIE的问题。。。。。 有没有好一点的php分页原生代码啊 求大神分享一下代码+注解 急!有关发送邮件的标题! 如何在点击某个连接时,设置session呢?
select num,max(length(num)) as len from table where num like '001%' group by num order by len desc limit 1
这个意义重大
你最好看看相关文章
我的理解不完全 怕误导你
而且 明白 group by 很有意义
还想继续问下,怎么查找以001开头的长度为六位的数据呢?
比如
4 e 001001
5 f 001002
9 u 001003