INNER Join is often called a SIMPLE Join as it is the simplest among all the kinds of joins and is also the most common one. When the join condition is met, the INNER Join returns all the rows from multiple tables.
SELECT expr_1, expr_2, ... expr_n FROM table_1 INNER JOIN table_2 ON join_predicate;
expr_1, expr_2, … expr_n:It is used to specify the columns of the table which needs to be joined.
table_1, table_2: It is used to specify the name of the tables from which the records need to be joined.
join_predicate: It is used to specify the joining conditions to be strictly followed by the rows to be included in the result set.
SELECT students.student_id, students.student_name, teachers.teacher_id FROM students INNER JOIN teachers ON students.student_name = teachers.teacher_name
STUDENT_ID STUDENT_NAME TEACHER_ID 1 Joy 101 2 Smiley 102
The ‘students’ and the ‘teachers’ are the already existing tables. After the joining, the selected fields of the rows satisfying the conditions will be displayed as the result.