上面的语句是从该列所有元素中判断,如果要过滤掉f_xx.rec和f_xx.u这些元素select max(floor(substring(fname,3))) from $dt where str not like '%.%'select max(floor(substring(fname,3))) from $dt where instr(str,".")=0
为什么要加上floor函数? select max(floor(substring(fname,3))) from $dt where str not like '%.%' 这句。
不加上floor没法比较大小,因为还是字符串
不是吧?substring以后成了数字了已经。 而且如果是字符串的话f_99和f_110哪个大?另外,where str not like '%.%'里面的str是什么?
哦哪个str是我做测试没有改成你的fname
select max(floor(substring(fname,3))) from $dt where fname not like '%.%'orselect max(floor(substring(fname,3))) from $dt where instr(fname,".")=0
select max(floor(substring(fname,3))) from $dt where str not like '%.%'
这句。
而且如果是字符串的话f_99和f_110哪个大?另外,where str not like '%.%'里面的str是什么?
这样还要floor?