inner join、left join、right join中where和and的作用
来源:互联网 发布:软件测试过程 编辑:程序博客网 时间:2024/05/21 01:47
inner join、left join、right join中where和and的作用
1、内连接(自然连接): 只有两个表相匹配的行才能在结果集中出现
2、外连接: 包括
(1)左外连接 (左边的表不加限制) select a.studentno, a.studentname, b.classname from students a, classes b where a.classid = b.classid(+); (2)右外连接(右边的表不加限制) select a.studentno, a.studentname, b.classname from students a, classes b where a.classid(+) = b.classid
(3)全外连接(左右两表都不加限制)
即:
左连接显示左边全部的和右边与左边相同的
右连接显示右边全部的和左边与右边相同的
内连接是只显示满足条件的!
3.inner join(等值连接) 只返回两个表中联结字段相等的行,where和and条件都对整体查询结果有影响。
4.left join(左联接) 返回包括左表中的所有记录和右表中联结字段相等的记录,right join(右联接) 返回包括右表中的所有记录和左表中联结字段相等的记录,这里一并讨论:
where条件可以对整体查询结果进行筛选,而and只会对连接的表进行筛选。
感谢:http://www.2cto.com/database/201309/243459.html
0 0
- inner join、left join、right join中where和and的作用
- inner join、left join、right join中where和and的作用
- inner join、left join和right join的作用
- left join;right join;inner join;where
- 数据库 inner join,right join,left join ,以及其后的and ,where 条件
- INNER JOIN 、 LEFT JOIN 和 RIGHT JOIN
- inner join、Left Join和Right join
- 【SQL】 left join、right join and inner join的区别
- left join,right join,inner join的条件on和where的区别
- left join和right join和inner join的区别
- sql中left join、right join、inner join的区别
- mysql中left join、right join、inner join的区别
- MYSQL中 inner join left join right join的区别
- SQL中left join,right join,inner join的区别
- SQL中inner join,left join,right join的区别
- mysql中left join,right join,inner join的区别
- Inner join , Left join 和Right join 的区别
- left join 和 right join ,inner join的区别
- Oracle RMAN备份中catalog和nocatalog区别
- win7给标准用户授予管理员权限的问题
- Android - ListView自定义适配器Adapter中获得EditText的值
- 数据库范式-通俗讲义
- MySQL check the manual that corresponds to your MySQL server version for the right syntax错误
- inner join、left join、right join中where和and的作用
- hibernate、DetachedCriteria中关于clob获得HibernateTemplate对象的转换
- 关于汇编语言寄存器和指令操作的整理
- openwrt机器人:超牛
- 小小运维工程师的一个小理想
- C++Vector用法
- 【Shell】shell job 管理
- Mongo实现主从复制与集群,使用Replica Sets实现
- 关于编译器对c++ 类静态成员、静态成员函数、非静态成员函数的处理