Chapter 7 addition and subtraction of a set operation 7-1 Table

Source: Internet
Author: User
1. What is a set of operations: a set represents the sum of "various" things in mathematics. Indicates a set of records in the database field. Set operation: the set operation is the addition, subtraction, and other four operations on records meeting the same rule. Ii. Addition of tables -- Union addition operation union Union

Union and other set operations usually remove Repeated Records. Iii. Considerations for Set Operations 1 ?? The number of columns of records as calculation objects must be the same. Note 2 ?? The types of columns in the record as the calculation object must be consistent. Note 3 for the type conversion function cast ?? Any SELECT statement can be used, but the order by clause can only be used once. Iv. Set operation that contains duplicate rows -- all option Union all

5. Select the public part in the table-intersect intersection and use and to select a public part that meets multiple conditions in the table. Intersect is applied to two tables and the public records in the table are selected. Note: MySQL cannot use intersect 6. the subtraction of records-Except t difference set is different in the position of subtrahend and subtrahend, and the results are also different. Note: MySQL cannot use ipvt.

Chapter 7 addition and subtraction of a set operation 7-1 Table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.