现有书目表 book,包含字段:price (float);现在查询一条书价最高

题库2022-08-02  32

问题 现有书目表 book,包含字段:price (float);现在查询一条书价最高的书目的详细信息,以下语句正确的是( )。A.select top 1 * from book order by price asC.B.select top 1 * from book order by price desC.C.select top 1 * from book where price= (select max (price)from book)D.select top 1 * from book where price= max(price)

选项 A.select top 1 * from book order by price asC.B.select top 1 * from book order by price desC.C.select top 1 * from book where price= (select max (price)from book)
D.select top 1 * from book where price= max(price)

答案 BC

解析 A 选项应该是的 desc,D 选项不可以直接写 max(price)。
转载请注明原文地址:https://tihaiku.com/gongwuyuan/2556432.html

最新回复(0)