InterviewSolution
| 1. |
What Is Inner Join? Explain With An Example? |
|
Answer» INNER JOIN: Inner join returns rows when there is at least one match in both tables. SELECT COLUMN NAME(s) FROM table_name1 INNER JOIN table_name2 ON table_name1.column_name=table_name2.column_name Example: To display records of an employee who got an appraisal. SELECT employee.firstname, appraisal. AMOUNT FROM employee INNER JOIN appraisal ON employee.id = appraisal.employee.id; INNER JOIN: Inner join returns rows when there is at least one match in both tables. Syntax: SELECT column name(s) FROM table_name1 INNER JOIN table_name2 ON table_name1.column_name=table_name2.column_name Example: To display records of an employee who got an appraisal. SELECT employee.firstname, appraisal. amount FROM employee INNER JOIN appraisal ON employee.id = appraisal.employee.id; |
|