mysql - How to cross join using 3 tables? -


enter image description here

i have 3 tables: customer,barang , det_barang.

customer + barang = 1 many

barang + det_barang = many many

how cross 3 table above? , result shown in 4th table

link sql file : test.sql

select c.nama customer, b.no no_barang, d.qty customer c join barang b left join det_barang d on c.no = d.no_cust , b.no = d.no_barang order c.no, b.no 

Comments