Javatpoint Logo

91-9990449935

 0120-4256464

SQL SELECT from Multiple Tables

This statement is used to retrieve fields from multiple tables. To do so, we need to use join query to get data from multiple tables.

Let's see the example for the select from multiple tables:

Let us take three tables, two tables of customers named customer1 and customer2 and the third table is product table.

Customer1 table

Cus_idName1
1Jack
2Jill

Customer2 table

Cus_idName2
1Sandy
2Venus

Product table

P_idCus_idP_name
11Laptop
22Phone
3P1Pen
4P2Notebook

Example syntax to select from multiple tables:

P_idCus_idP_nameP_nameP_name
11LaptopJackNULL
22PhoneJillNULL
3P1PenNULLSandy
4P2NotebookNULLVenus
Next TopicSQL Select Date