sql server2008中左连接,右连接,等值连接的区别

sql server2008中左连接,右连接,等值连接的区别

数据库中的连接我了解到有left join,right join,inner join这些,以下是它们的区别:

1)左连接(left join:先取出a表的所有数据,再取出ab表相匹配的数据

 sql server2008中左连接,右连接,等值连接的区别

2)右连接(right join):先取出b表的所有数据,再取出ab表相匹配的数据

 sql server2008中左连接,右连接,等值连接的区别

3)等值连接(inner:取出ab表都匹配的数据

 sql server2008中左连接,右连接,等值连接的区别