select 1 与select * 的比较
select MC.STCODE,MC.STNAME,SUM(MC.TOTAL) TOTAL,'非周末'
from MC_SDRPTSXS MC,FASOLARTOLUNAR FA
where MC.FILDATE=FA.SOLARDATE AND exists (select 1
from store
where store.countries = '中国香港' AND CODE LIKE /*VSTCODE ||*/ '000871%'
and MC.stgid = gid)
and fildate>='2016-03-06'
and fildate<'2016-03-17'
AND FA.WEEK not IN ('星期六','星期日')
GROUP BY MC.STCODE,MC.STNAME
与
select MC.STCODE,MC.STNAME,SUM(MC.TOTAL) TOTAL,'非周末'
from MC_SDRPTSXS MC,FASOLARTOLUNAR FA,store
where MC.FILDATE=FA.SOLARDATE AND store.countries = '中国香港' AND CODE LIKE /*VSTCODE ||*/ '000871%'
and MC.stgid = gid
and fildate>='2016-03-06'
and fildate<'2016-03-17'
AND FA.WEEK not IN ('星期六','星期日')
GROUP BY MC.STCODE,MC.STNAME
这两个有啥不一样,那个更好点?