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