select * from A INNER JOIN B ON A.ID = B.nGrop where and B.sTatus <> 100 and A.nPri<(select MIX(B.nPri) from A INNER JOIN B ON A.ID = B.nGrop where and B.sTatus <> 100)
declare @npri int select @npri = min(a.npri) from a,b where a.ID = b.nGrop and b.sTatus <> 100select * from a where npri < @npri
select a.* from a where nPri < (select min(nPri) from b where A.ID = B.nGrop and B.sTatus <> 100 )
<any select a.* from a where nPri<any(select nPri from b where A.ID = B.nGrop and B.sTatus <> 100 )
select * from a where nPri < ( select min(nPri) from b where A.ID = B.nGrop and B.sTatus <> 100 )
select * from a where nPri < ( select min(a.nPri) from a,b where A.ID = B.nGrop and B.sTatus <> 100
select * from a where nPri < ( select min(a.nPri) from a,b where A.ID = B.nGrop and B.sTatus <> 100 )
select *
from A INNER JOIN B ON A.ID = B.nGrop
where and B.sTatus <> 100
and A.nPri<(select MIX(B.nPri)
from A INNER JOIN B ON A.ID = B.nGrop
where and B.sTatus <> 100)
declare @npri int
select @npri = min(a.npri) from a,b where a.ID = b.nGrop and b.sTatus <> 100select * from a where npri < @npri
select a.* from a where nPri < (select min(nPri) from b where A.ID = B.nGrop and B.sTatus <> 100 )
select a.* from a where nPri<any(select nPri from b where A.ID = B.nGrop and B.sTatus <> 100 )
select *
from a
where nPri < ( select min(nPri)
from b where A.ID = B.nGrop
and B.sTatus <> 100
)
select *
from a
where nPri < ( select min(a.nPri)
from a,b
where A.ID = B.nGrop
and B.sTatus <> 100
select *
from a
where nPri < ( select min(a.nPri)
from a,b
where A.ID = B.nGrop
and B.sTatus <> 100
)