HomeInterview QuestionsDo you know how to perform joins in SQL?

Do you know how to perform joins in SQL?

🟢 Easy Conceptual Junior level
1Times asked
May 2026Last seen
May 2026First seen

💡 Model Answer

To perform a join in SQL, you write a SELECT statement that references two or more tables and specifies the join type and condition. For example:

sql
SELECT a.id, a.name, b.salary
FROM employees a
INNER JOIN salaries b ON a.id = b.emp_id;

This inner join returns only employees that have a matching salary record. You can replace INNER with LEFT, RIGHT, or FULL to include unmatched rows. The ON clause defines the join key; you can use multiple conditions or inequalities for more complex logic. For cross joins, omit the ON clause:

sql
SELECT * FROM table1 CROSS JOIN table2;

Remember to alias tables for readability and to avoid column name conflicts. Using proper indexes on join columns improves performance, especially for large tables.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.

Get Assisting AI — Starts at ₹500