Home > Database > Mysql Tutorial > body text

数据库中的关系运算

WBOY
Release: 2016-06-07 15:22:34
Original
2131 people have browsed it

1、和(Union)运算、针对行 针对两张具有相同属 性的表,将两者表合并起来,在合并过程中遇到重复的行保留一项就行了。 2、差(difference)运算、针对行 vc3Ryb25nPjwvcD4KPHA+PHN0cm9uZz4gICAgICA8L3N0cm9uZz7V67bUwb3Vxb7f09DP4M2syvQg0NS1xLHto6y12tK71

1、和(Union)运算、针对行

针对两张具有相同属 性的表,将两者表合并起来,在合并过程中遇到重复的行保留一项就行了。

\

2、差(difference)运算、针对行喎?http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vc3Ryb25nPjwvcD4KPHA+PHN0cm9uZz4gICAgICA8L3N0cm9uZz7V67bUwb3Vxb7f09DP4M2syvQg0NS1xLHto6y12tK71cWx7bz1yKW12rb+1cWx7dbQ09C1xMTayN2hozxicj4KPC9wPgo8cD48aW1nIHNyYz0="http://www.2cto.com/uploadfile/Collfiles/20131221/201312210908016.jpg" alt="\">

3、交(intersection)运算、针对行

针对两张具有相同属 性的表,求出两个表相同的行。

\

4、广义笛卡尔积(Extended Cartesian Product)运算、针对行

两张表行的组合,并且属性是两者之和。

\

5.选择(Selection)运算、针对行

根据某种条件选择出指定的行。就是查询操作,一般用where语句。

\

6.投影(Projection)运算、针对列

选出一个表的某些属性。


7.连接(Join)运算、针对行

从第一张表中取出几行,从第二张表中取出几行,两者的笛卡尔乘积构成最终的结果。如果是自然连接还要取消相同属性的列。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!