How to Create Inner Joins in Access

Save

Microsoft Access allows users to create advanced queries which often include joins. Inner joins compares results from two tables and returns a match when the specified related fields are equal. They are the most common types of joins and are the easiest type of join to create. Inner joins are perfect for more advanced filtering of data between related tables.

  • Open an existing Microsoft Access database with at least two related tables. Related tables should have at least one field in common.

  • Press "Queries" in the database window. Either open an existing query in Design View or create a new query in Design View. Queries will need to include at least two tables with a related field.

  • Add two tables with a related field to your query if you're creating a new query.

  • Drag a line between the related field or fields of the two tables you wish to compare. Note that fields don't necessarily need to contain the exact same data. For instance, related number fields can be compared to see if one table is greater than or less than the other.

  • Create the inner join in SQL View by pressing the "View" button on the toolbar. Select "SQL View."

  • Type "INNER JOIN" after the table name on the "FROM" line. If you completed Step 4, INNER JOIN will already be in place. An example query would look similar to the following:

    SELECT Table1.Field1, Table1.Field2, SecondTable.Field1, SecondTable.Field2
    FROM Table1 INNER JOIN SecondTable ON Table1.Field2 = SecondTable.Field2;

Tips & Warnings

  • The operator between the tables can be any comparison operator that is appropriate. If joining multiple fields, place each join in parentheses.
  • If using the SQL method for inner joins, be sure to type the query correctly. Incorrect syntax can result in errors. Using the Access In-Software help will show you the correct syntax.

References

  • Access In-Software Help -- Inner Join Operation
Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!