Difference of join in query & relationship

  • Thread starter Rasoul Khoshravan Azar
  • Start date
R

Rasoul Khoshravan Azar

What is difference between "Join multiple tables and queries in a query" and
relationship linking tables to eachother. I was expecting that if we relate
tables in relationship window, there should be no need for joining fields in
query design view.

TIA
Rasoul Khoshravan Azar
Tabriz,Iran
 
S

Steve Schapel

Rasoul,

Generally, if you have a relationship defined between two tables in the
Relationships window, this join will be entered by default if you add
both these tables to the design view of a query. Of course, sometimes
the requirements of the query are that you want a different join between
the tables than the one defined in the Relationships.
 
G

Guest

The only reason to define relationships in the relationships window is
because you want to enforce referential integrity and possibly specify
cascade update and/or cascade delete.

When you create a query and add two tables that have a defined relationship,
Access will automatically create the join line for you. This may or may not
be what you want. Usually it is but you can change it if you want. The
joins you create in a query simply tell Jet how to process the tables for
THIS query. The joins don't have to make any sense at all. The only
requirement is that the data types match. You can join the CourseID from the
tblCourse to the StudentID from the tblStudent if you want to. It doesn't
make sense and you certainly won't get any meaningful data returned but the
data types match so you can do it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top