Sql select from multiple tables with conditions
- select two table in sql
- select more than one table in sql
- select multiple table in sql
- select 2 table in sql
Sql select from multiple tables with same column name
How to select data from two tables in sql with where clause!
SQL SELECT from Multiple Tables
next>><<prev
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
Customer2 table
Product table
| P_id | Cus_id | P_name |
|---|---|---|
| 1 | 1 | Laptop |
| 2 | 2 | Phone |
| 3 | P1 | Pen |
| 4 | P2 | Notebook |
Example syntax to select from multiple tables:
| P_id | Cus_id | P_name | P_name | P_name |
|---|---|---|---|---|
| 1 | 1 | Laptop | Jack | NULL |
| 2 | 2 | Phone | Jill | NULL |
| 3 | P1 | Pen | NULL | Sandy |
| 4 | P2 | Notebook | NULL | Venus |
Next TopicSQL Select Date
<<prevnext>>
- select two tables sql without join
- select data from two table in sql