Fabrication
Fabrication
Learning Outcomes
- Learn how to use the
UNION
set operator to fabricate two literal rows into a unique table. - Learn how to use the
UNION ALL
set operator to fabricate two literal rows into a non-unique table. - Learn how to use literal matrixes to fabricate data.
Lesson Materials
You can query a literal value by using the dual pseudo table, like this:
Unlike joins where you get to specify the columns that the join uses to match values, set operators match the SELECT
-list of the two queries. The two queries must have the same SELECT
-list columns, which is defined by position, column name, and data type. That means your choice of the SELECT
-list columns determines the join conditions between the queries.
- Literal Fabrication
- Literal fabrication lets you create multiplication matrixes for your data. You use the
UNION
operator to ensure unique values when you can not guarantee unique values and theUNION ALL
operator when the literal values are unique. - Data Fabrication
- Data fabrication lets you add columns to existing data sets.
Typically, the columns that you let you make decisions with the expanded data set.