ÎÒÒª²é³ö tableA µÄaid,aname ºÍtableBÖÐaidÏà¶ÔÓ¦µÄbid ºÍ tableCÖÐaidÏà¶ÔÓ¦µÄ×ÜÊý ÎÒÔÀ´µÄ˼·ÊÇ 1¡¢select ta.aid,ta.aname,tb.bid from tableA ta,tableB b where ta.aid = tb.aid; 2¡¢±éÀúÉÏÃæ²é³öµÄList£¬Í¨¹ýaidÈ¥ select count(cid) from tableC where aid=.....
ÓÐûÓÐÒ»ÌõSQLÓï¾äÄÜÂú×ãÎÒµÄÌõ¼þ£¿ ¼±Ç󣡣¡SQL code: select a.aid,aname,bid,num from (select a.aid,aname,bid from tableA a,tableB b where a.aid = b.aid) a, (select aid,count(cid) num from tableC group by aid) b where a.aid = b.aid;
select ta.aid,ta.aname,tb.bid,count(c.cid) over(partition by ta.aid) from tableA ta,tableB b, tableC c where ta.aid = tb.aid and ta.aid = c.aid(+);
¸÷´óÀÏʦºÃ£¬Çë½ÌÒ»¸öÎÊÌ⣮ ÎÒÉèÖÃÁËÒ»¸öoracle×ֶΣ¬varchar(3000),È»ºó²åÈëÒ»ÌõÊý¾Ý³¤¶È²Å1000,¾Í±¨´íÁË£®È磺net.sf.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update Caused ......