JOIN iki tabelayi baglar
 

News:

Abdullah Kaya vefat etti.

Main Menu

JOIN iki tabelayi baglar

Started by sidre, 21 Nov 2022, 05:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sidre

SELECT * FROM Customers C
join orders O
where C.customer_id = O.customer_id
order by c.customer_id

Output
customer_id   first_name   last_name   age   country   order_id   item   amount   customer_id
1   John   Doe   31   USA   4   Keyboard   400   1
2   Robert   Luna   22   USA   5   Mousepad   250   2
3   David   Robinson   22   UK   3   Monitor   12000   3
4   John   Reinhardt   25   UK   1   Keyboard   400   4
4   John   Reinhardt   25   UK   2   Mouse   300   4