gaoxt1983
发贴: 67
积分: 0
|
于 2006-11-08 17:23
I have three table : table A has many table B, table B has many table C, sometimes , I want to find all A 's data , and each A's row , I want to find all the B which meet the condition, which is a iteration. But my companymates warning me not to do that, because of effective. I should do that : select max(a.position_name) as pn, max(c.name) as dn, count(*) as c from position a, resume b, department c where a.id = b.position_id and a.department_id = c.id group by b.position_id
I think this method is sick , but I don't know better, would anyone help me?
why edited on 2006-11-08 19:24
|