Abstract

This chapter highlights the implementations of additional relational algebra operations in Structured Query Language (SQL). Union is one of the few relational algebra operations whose name can be used in a SQL query. When one wants to use a union, write two individual SELECT statements, joined by the keyword UNION. The columns retrieved by the two SELECT must have the same data types and sizes and be in the same order For example, the following is legal as long as the customer numbers are the same data type (for example, integer) and the customer names are the same data type and length. INTERSECT operates on the results of two independent tables and must be performed on union compatible tables. In most cases, the two source tables are each generated by a SELECT. INTERSECT is the relational algebra intersect operation, which returns all rows the two tables have in common. It is the exact opposite of EXCEPT.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call