请问两条SQL语句的效率
dfwxj 2011-12-05 01:04:40 表说明:
1、系统信息表
sysinfo.opid 当前操作员号
2、仓库档案表
ywh.whcode 仓库编号
ywh.whname 仓库名称
3、操作员对仓库的操作权限表
yopwh.opid 操作员号
yopwh.whcode 可操作仓库编号
目标:列出当前操作员可操作的仓库
1、用连接
SQLExec(lnhandle,"select ywh.whcode,whname from ywh left join yopwh on ywh.whcode=yopwh.whcode where opid=?sysinfo.opid","curjswh")
2、用嵌套查询
SQLExec(lnhandle,"select whcode,whname from ywh where whcode in (select whcode from yopwh where opid=?sysinfo.opid)","curjswh")
请问:哪种方式效率高些?