What is inner join? Explain with an example?
Submitted by: AdministratorINNER 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;
Submitted by: Administrator
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;
Submitted by: Administrator
Read Online MS SQL Server Joins Job Interview Questions And Answers
Top MS SQL Server Joins Questions
☺ | What is inner join? Explain with an example? |
☺ | What is Merge join? |
☺ | What is LEFT OUTER JOIN? |
☺ | What is OUTER JOIN? |
☺ | What is FULL OUTER JOIN? |
Top New MS SQL Server Categories
☺ | SQL Server Database Administrator Interview Questions. |
☺ | SQL Server Service Broker Interview Questions. |
☺ | SQL Server Locks Interview Questions. |
☺ | SQL Server Constraints Interview Questions. |
☺ | MS SQL Data Mining Interview Questions. |