日期:2014-05-18 浏览次数:20397 次
select model from ( (select model,price from PC) UNION (select model,price from Laptop) UNION (select model,price from Printer) )M where ( M.price>=ALL ( select price from ( (select price from PC) UNION (select price from Laptop) UNION (select price from Printer) )R ) )
select model from ( (select model,price from PC) UNION (select model,price from Laptop) UNION (select model,price from Printer) )M where ( ALL ( select price from ( (select price from PC) UNION (select price from Laptop) UNION (select price from Printer) )R )<=M.price )
--这是一种语法,就像datepart(day,getdate())一样,你不可以把它放错位置 scalar_expression { = | < > | ! = | > | > = | ! > | < | < = | ! < } { ALL | SOME | ANY } ( subquery )