exists 用法

/****** Script for SelectTopNRows command from SSMS ******/
SELECT *
FROM [MyDB].[dbo].[LbShops] where biz_type = 1 and not exists (

SELECT shop_strid

FROM [MyDB].[dbo].[shop_sell] where shop_strid = [LbShops].shop_strid
)

速度很快

原文地址:https://www.cnblogs.com/CodeGear/p/11019493.html