select count(*) as num from product ,agent,agentprice where agentprice.cpbm=product.cpbm and agentprice.dlbm=agent.dlbm 看不出有什么错误,会不会是没有符合条件的记录啊
select count(*) as num from product ,agent,agentprice where agentprice.cpbm=product.cpbm(+) and agentprice.dlbm=agent.dlbm(+)
zhenyukeji(何处是我家) 这位大哥,(+)放在那里是什么意思啊?
相当于sql server中的left join
现在好一点了,可以查到num=4有4条记录。但是下面还用这样的sql语句 select * from product ,agent,agentprice where gentprice.cpbm=product.cpbm(+) and agentprice.dlbm=agent.dlbm(+) 然后用<%=rs.getString("mc")%>去取不出agent表中的"mc"字段,显示为null,可我那里有记录呢,为什么啊?
看不出有什么错误,会不会是没有符合条件的记录啊
select * from product ,agent,agentprice where gentprice.cpbm=product.cpbm(+) and agentprice.dlbm=agent.dlbm(+)
然后用<%=rs.getString("mc")%>去取不出agent表中的"mc"字段,显示为null,可我那里有记录呢,为什么啊?