日期:2014-05-16  浏览次数:20748 次

取出一个表的最小值 同时 取出 最小值的日期 是怎样写 sql
SELECT min(price) as price , date from a_price

取出一个表的最小值 同时 取出 最小值的日期 是怎样写 sql
上面好像不对

------解决方案--------------------
SQL code
select price,`date`
from a_price t
where not exists(select 1 from a_price where price<t.price)

------解决方案--------------------
SQL code
select price,`date` from  a_price order by price limit 1

------解决方案--------------------
探讨
SQL code
select price,`date`
from a_price t
where not exists(select 1 from a_price where price<t.price)