课程
/数据库
/MySQL
/与MySQL的零距离接触
SELECT goods_name FROM tdb_goods WHERE MIN(goods_price);
2017-03-30
源自:与MySQL的零距离接触 4-6
正在回答
SELECT goods_id,goods_price,goods_name FROM tdb_goods WHERE goods_price=(SELECT MIN(goods_price) FROM tdb_goods);
MIN(goods_price)并不会返回一个值
select * from tdb_goods where goods_price=(select MIN(goods_price) from tdb_goods);
连敏于 提问者
MIN(goods_price)是一个数值,为goods_price中的最小价格。where后面跟上是条件,改为goods_price=MIN(goods_price)就对了
举报
本课程涵盖全部MySQL数据库的基础,学习MySQL数据库的基础知识