A vertical join is the process of combining two or more tables vertically by appending the rows of one table to the rows of another, typically using a UNION
or UNION ALL
clause. For this operation to work correctly, the tables being combined should have matching datatypes for the corresponding columns.
In essence, it's like stacking tables on top of each other. The key requirement is that the columns you're aligning from each table must have compatible data types.
Here's a breakdown:
- Method: Uses
UNION
orUNION ALL
. - Data Type Compatibility: The data types of corresponding columns in the tables must match sequentially.