分数不多,求一简单语句的优化方案 SELECT * FROM [P_Label] WHERE SortID IN (SELECT SortID FROM [P_Sort] WHERE ShowLabel=1) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 等价于SELECT * FROM [P_Label] WHERE exists ( select 1 from [P_Sort] WHERE ShowLabel=1 and [P_Label].SortID = [P_Sort].SortID) SELECT * FROM [P_Label] WHERE exists (select 1 from [P_Label] a inner join [P_Sort] b on a.SortID=b.SortID where b.ShowLabel=1) 请教一个问题 SQL语句? 有关sqlserver 2005 时间的用法 关于自定义函数。 如何在sal语句中虚拟一条记录 Reporting Services 2005中SubReport的使用 求个sql语句 问:百万级数据查询优化 高手们请赐教:数据存储的分布与集中的问题?kitty 如何判断数据库是否启动,用VBSCRIPT怎么写 匹配进出 请教一个问题
SELECT * FROM [P_Label]
WHERE exists (
select 1 from [P_Sort] WHERE ShowLabel=1 and [P_Label].SortID = [P_Sort].SortID
)
WHERE exists (
select 1 from [P_Label] a
inner join [P_Sort] b
on a.SortID=b.SortID
where b.ShowLabel=1
)