求SQL 找出时间最小的一行
create table test(
userid varchar2(10),
username varchar2(10),
in_time date);
怎么找出in_time时间为最小的一行??
------解决方案-------------------- select * from test
where in_time in(select min(in_time) from test)
------解决方案--------------------select * from test
where in_time =(select min(in_time) from test)
------解决方案--------------------select *
from test
where in_time = (select min(in_time)
from test);
我觉得应该可以用=吧,子查只返回一个最小值