There are 2 tables. One table has missing values in columns. So how do you perform join operation between those 2 tables?

SQL Question

We can use left join for that if there is something missing in the rows while taking left side the table which has no values.

We can use left or full join to include all values from second or both the tables. Below are the examples how we can write this sql statement

Joining two tables: Order and Product

SELECT Order.OrderNr, Product.Name, Product.Price

FROM Order

LEFT JOIN Product ON Order.ProductId = Product.ProductId

OR

SELECT Order.OrderNr, Product.Name, Product.Price

FROM Order

FULL JOIN Product ON Order.ProductId = Product.ProductId