日期:2014-05-17 浏览次数:20724 次
select * from tb_c_info as a inner join tb_c_attrib as b on a.c_id=b.c_id inner join tb_c_o_record as c on a.c_id=c.c_id where c.r_file like '%.avi'
select *
from tb_c_info as a
inner join tb_c_attrib as b on a.c_id=b.c_id
inner join
(select t1.*
from tb_c_o_record t1
inner join (select MAX(r_id) r_id,c_id FROM tb_c_o_record GROUP BY c_id)t2
on t1.r_id=t2.r_id and t1.c_id=t2.c_id
)c on a.c_id=c.c_id
where c.r_file like '%.avi'