| 发表于:2008-01-15 11:15:255楼 得分:0 |
left outer join === left join rirht outer join === right join full outer join === full join inner join === a = b no full inner join no left inner join no right inner join they are the same as the "inner join" full join 和 full out join 都支持的 例子: select stf.id ,emp.empno from staff stf full join employee emp on stf.id = cast(emp.empno as smallint) and emp.job = 'manager' where stf.id < 60 order by stf.id; 或者 select stf.id ,emp.empno from staff stf full outer join employee emp on stf.id = cast(emp.empno as smallint) and emp.job = 'manager' where stf.id < 60 order by stf.id; 结果: id empno ------ ------ 10 - 20 000020 30 000030 40 - 50 000050 5 条记录已选择。 | | |
|