Suppose we have two tables, where the key from both is name_id.
name_id
Using the following code:
SELECT * FROM table1 INNER JOIN table2 ON table1