oracle sql

查找字段内容最长的记录

1.使用函数length()

2.使用rownum

select t.*,t.rowid,rownum , length(t.templates) len from t3103_template t where type='体检项目' and rownum=1  order by len desc

posted @ 2011-11-01 15:00  huangqing  阅读(95)  评论(0)    收藏  举报