如何使用多选语句

时间:2013-12-01 14:48:30

标签: sql-server stored-procedures

select Pricing 
from Maarj_License_Management_ServerPrice 
where Status=1 
and (IDServer =(select IDServer from Maarj_License_Management_Server 
                 where NumberServer > @NumberServer ))

我想选择最直接但不工作的定价

1 个答案:

答案 0 :(得分:0)

select Pricing 
from Maarj_License_Management_ServerPrice 
where Status=1 
and IDServer IN (select IDServer from Maarj_License_Management_Server 
                 where NumberServer > @NumberServer )
ORDER BY NumberServer