ASP 同时读取2个表
ASP同时读取两个表,同时要求表a数据符合P_ShenHe=-1,a.P_LeiBie=2有这种写发吗SetRs=Conn.Execute("SelectTop8a.P_...
ASP同时读取两个表,同时要求表a数据符合P_ShenHe=-1,
a.P_LeiBie=2
有这种写发吗
Set Rs=Conn.Execute("Select Top 8 a.P_Id,a.P_Title,a.P_LeiBie,a.P_Content,a.P_ShenHe,a.P_JingHua,b.P_Hync,b.P_UserId From HH_WangYouSuiBI as a,HH_User as b Where a.P_LeiBie=2 And a.P_ShenHe=-1 and a.P_UserId=b.P_UserId Order By P_Id desc")
有这种写法吗
Set Rs=Conn.Execute("Select a.P_Id,a.P_LeiBie,a.P_Content,a.P_ShenHe,b.P_Hync From HH_WangYouSuiBI as a left join HH_user as b on a.p_id=b.p_id ab where a.P_LeiBie=2 and a.P_ShenHe=-1 Order By a.P_Id desc")
两个表我已经写好了 请问下 还有第三个表c c.p_id=a.p_id
如何加入查询这个表呢 展开
a.P_LeiBie=2
有这种写发吗
Set Rs=Conn.Execute("Select Top 8 a.P_Id,a.P_Title,a.P_LeiBie,a.P_Content,a.P_ShenHe,a.P_JingHua,b.P_Hync,b.P_UserId From HH_WangYouSuiBI as a,HH_User as b Where a.P_LeiBie=2 And a.P_ShenHe=-1 and a.P_UserId=b.P_UserId Order By P_Id desc")
有这种写法吗
Set Rs=Conn.Execute("Select a.P_Id,a.P_LeiBie,a.P_Content,a.P_ShenHe,b.P_Hync From HH_WangYouSuiBI as a left join HH_user as b on a.p_id=b.p_id ab where a.P_LeiBie=2 and a.P_ShenHe=-1 Order By a.P_Id desc")
两个表我已经写好了 请问下 还有第三个表c c.p_id=a.p_id
如何加入查询这个表呢 展开
2个回答
展开全部
Set Rs=Conn.Execute("Select Top 8 a.P_Id,a.P_Title,a.P_LeiBie,a.P_Content,a.P_ShenHe,a.P_JingHua,b.P_Hync,b.P_UserId From HH_WangYouSuiBI as a JION HH_User as b Where a.P_LeiBie=2 And a.P_ShenHe=-1 and a.P_UserId=b.P_UserId Order By P_Id desc")
2010-01-19
展开全部
参考这个
select * from (select a.*,b.name from job_id a inner join job_resume b on a.resumeid=b.id) d left join job c on d.jobid=c.id
select * from (select a.*,b.name from job_id a inner join job_resume b on a.resumeid=b.id) d left join job c on d.jobid=c.id
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询