日期:2014-05-18 浏览次数:20453 次
SELECT * FROM (aaa a LEFT JOIN bbb b ON a.aid=b.a_aid) LEFT JOIN ccc c ON a.aid=c.aa_aid WHERE content='xxx' ORDER BY a.a_addtime DESC,b.b_addtime DESC,c.c_addtime DESC
aid a_addtime content bid a_aid b_addtime cid aa_aid c_addtime ----------- ----------------------- ------- ----------- ----------- ----------------------- ----------- ----------- ----------------------- 4 2012-01-30 00:00:00.000 xxx 2 4 2012-02-01 00:00:00.000 NULL NULL NULL 3 2012-01-03 00:00:00.000 xxx NULL NULL NULL 1 3 2012-01-05 00:00:00.000 2 2012-01-02 00:00:00.000 xxx 1 2 2012-01-08 00:00:00.000 NULL NULL NULL 1 2012-01-01 00:00:00.000 xxx NULL NULL NULL NULL NULL NULL (4 行受影响)