Problem with this T-SQL statement# Database - 数据库
w*p
1 楼
I have 2 tables A and B in SQL Server
A: B:
price product price product
1 A 1 B
2 C 3 D
select * from a where price < all (select price from b where price > 10)
select * from a where price = all (select price from b where price > 10)
select * from a where price > all (select price from b where price > 10)
all give out 2 records in a
if i change "all" to "any", it will not return nothing at all.
could anyone ex
A: B:
price product price product
1 A 1 B
2 C 3 D
select * from a where price < all (select price from b where price > 10)
select * from a where price = all (select price from b where price > 10)
select * from a where price > all (select price from b where price > 10)
all give out 2 records in a
if i change "all" to "any", it will not return nothing at all.
could anyone ex