a为主表
b为流程表
把主表和流程表的最后一条操作记录选出来
我现在这么些的,貌似不大好。
select * from a,
(select max(flow_id),list_id from b group by list_id) b
where a.list_id=b.list_id
我还想把b表中其他信息取出来,请问怎么写?每个字段上都加个函数?select * from a,
(select max(flow_id),max(...),max(...) list_id from b group by list_id) b
where a.list_id=b.list_id