I have two tables, I am wondering whether is it possible to write a single query on these two table but they are not connected to each other?
some sample code snippet whould be great helpful for my understanding.
Table: Payment
Payment_id Payment_status amount
1 1001 201 400
2 1002 403 450
3 1003 204 460
after running query : SELECT Payment_status FROM Payment GROUP BY Payment_staus
it gives me result like :
Payment_staus
1 201
2 403
3 204
I have one more table named status_code as
code description
1 201 In progress
2 403 Complete
3 204 On Hold
In above query I want Payment_staus and their respective description , the result should look like this
Payment_status description
1 201 In progress
2 403 Complete
3 204 On Hold
A Cartesian join (note there is no JOIN condition). All possible combinations of records are in the results:
Results: