The CROSS JOIN is used to generate a paired combination of each row of the first table with each row of the second table. This join type is also known as cartesian join. Suppose that we are sitting in a coffee shop and we decide to order breakfast.
Interviews2 answers
Can you give me a real-time scenario where you have applied CROSS JOIN in your project?
2 Answers
Rajeev KumarPosted Mar 17, 2023, 6:16 AM EDT
if I want to create a report which has all options.
| ComponentId | ComponentCode |
|---|---|
| 1 | Engine |
| 2 | Break System |
| InspectionId | InspectionDescription |
|---|---|
| 1 | Is Making Noise? |
| 2 | Is Over heating? |
select ComponentCode, InspectionDescription, 'Actual', from
Components CROSS JOIN Inspections
The final result will be.
| ComponetCode | InspectionDescription | Actual |
|---|---|---|
| Engine | Is Making Noise? | |
| Break System | Is Making Noise | |
| Engine | Is Over heating? | |
| Break System | Is Over heating? |
saravanakumar radhakrishnanPosted May 15, 2021, 4:57 AM EDT


