Data Retrieval in Database Data Retrieval Obtaining data from a database management system (DBMS), like for example an object- oriented database (ODBMS) 1) JOIN 2) UNION 3) INTERSECT 4) DISTINCT 5) ALIAS 6) COMPUTED COLUMNS JOIN Joining in SQL means retrieving data from two or more than two tables based on a common field. In other words, JOINs combine data from multiple tables in a result table based on a related column between those tables. 1. Inner Join The INNER JOIN keyword retrieves rows from two tables when there is a match based on a specific condition. It creates a result set by merging rows from both tables where the condition is met, meaning the values in the common field are identical. 2. Left Join A LEFT JOIN, also called a LEFT OUTER JOIN, retrieves all rows from the table on the left side of the join and pairs them with matching rows from the table on the right side of the join. If there is no matching row on the right side, the result-set will have null values for those rows. 3. Right Join A RIGHT JOIN, also known as a RIGHT OUTER JOIN, functions similarly to a LEFT JOIN. It retrieves all rows from the table on the right side of the join and pairs them with matching rows from the table on the left side of the join. If there is no matching row on the left side, the result-set will have null values for those rows. 4. Full Join
A FULL JOIN combines the outcomes of both a LEFT JOIN and a RIGHT JOIN. It includes all the rows from both tables in the result-set. If there's no match for a particular row, that row will still appear in the result-set with NULL values.