select min(value) from table1 where id='1' and value>'5';
但是这样查不到任何数据,求大神指导,谢谢~!
数据库sql
------解决方案-------------------- select t1.* from (select t.*,t.rownum tr from table1)t1 where tr=2; ------解决方案-------------------- 子查询需要order by才行的,LZ的SQL应该可以啊,
要不改成这样试试:
select min(TO_NUMBER(value)) from table1 where TO_NUMBER(id)=1 and TO_NUMBER(value)>5;