This image shows the Orders table and the Order Items table joined on the Order ID column and the Orders table is set to Preserve Grain.
Order ID | Order Total |
---|---|
1001 | 50.97 |
1002 | 1249.91 |
Order ID | Product ID | Quantity |
---|---|---|
1001 | 40 | 1 |
1001 | 63 | 2 |
1002 | 29 | 1 |
1002 | 14 | 3 |
1002 | 2 | 1 |
This table shows the query output based on the Order table set to Preserve Grain. It shows that the Product ID column is NULL to preserve the grain at the Orders level.
Order ID | Product ID | Order Total | Quantity |
---|---|---|---|
1001 | NULL | 50.97 | 3 |
1002 | NULL | 1249.91 | 5 |