mysql查询某一列的数据最大字节

语法:
select 列名, length(列名) 
from 表名
where 
length(列名) = ( select max(length(列名)) from 表名);

实例:
select project_num, length(project_num) 
from project_infor_table 
where 
length(project_num) = ( select max(length(project_num)) from project_infor_table);

猜你喜欢

转载自www.cnblogs.com/chuhongyun/p/11398273.html
今日推荐