当前位置: 代码迷 >> Sybase >> 请教有人知道sybase的全外联的sql语句如何写吗
  详细解决方案

请教有人知道sybase的全外联的sql语句如何写吗

热度:6227   发布时间:2013-02-26 00:00:00.0
请问有人知道sybase的全外联的sql语句怎么写吗?
请问有人知道sybase的全外联的sql语句怎么写吗?

------解决方案--------------------------------------------------------
select * from a,b where a.field1=b.field1(+)
union
select * from a,b where a.field1(+)=b.field1

order by col1,col2... ;

注意union中,select两个表的字段一定要全部一样,如果有group by等也要全部一样