select cc.code,cc.comment,cc.time from customercomment cc where cc.code='C3592'
union all
select c.code,c.designnotes,c.time from customernote c where c.code='C3592';以上是2张表联合查询,我需要给2表排序,比如code time paixu
C3592 2008-10-10 12:00:00 1
C3592 2008-10-10 12:10:00 2
我需要给2个表同时设置一个排序字段,可能在一张表是1,在另外一张表是2,我说明白没有,感觉好麻烦啊
union all
select c.code,c.designnotes,c.time from customernote c where c.code='C3592';以上是2张表联合查询,我需要给2表排序,比如code time paixu
C3592 2008-10-10 12:00:00 1
C3592 2008-10-10 12:10:00 2
我需要给2个表同时设置一个排序字段,可能在一张表是1,在另外一张表是2,我说明白没有,感觉好麻烦啊
另:另外2个帖子问题了吧?