Home >Database >SQL >How access establishes relationships between tables

How access establishes relationships between tables

醉折花枝作酒筹
醉折花枝作酒筹Original
2021-04-16 09:46:5347172browse

Method: 1. Create a database; 2. Click the "View" icon on the toolbar and select "Relationship" to open the window; 3. Select the added table in the "Add table to relationship" window and click "Add" to add the table to the window. After adding, click "Close" to return to the relationship window; 4. Click the primary key in the table and make another table the same as it, and click "OK".

How access establishes relationships between tables

The operating environment of this tutorial: Windows 10 system, Microsoft Office Access2019 version, Dell G3 computer.

After opening the Access database, we create two data tables as examples.

How access establishes relationships between tables

accessMethods to establish relationships between tables

1. After setting the data table, click Table to see that the two tables contain different field contents. If we want to query the record content of any field, we need to establish a relationship between the two tables and associate them. Select any table and click the View icon on the toolbar. Now switch to the design interface and click the [Relationship] button on the toolbar to open the relationship window.

How access establishes relationships between tables

How access establishes relationships between tables

3. In the "Relationship Add Table" window, select the table to be added, and then click the "Add" button to add The table is added to the Relationships window. Once added, click Close to return to the relationship window.

How access establishes relationships between tables

#4. Click the primary key field of one of the tables, that is, the only field without duplicate values. Hold down the mouse and drag it to the same field in another table to release it, then click OK in the pop-up window. Now these two tables have established a relationship with [employment certificate number]. You can later display matching field records in any table through a query.

How access establishes relationships between tables

How access establishes relationships between tables

Recommended tutorial: "sql video tutorial"

The above is the detailed content of How access establishes relationships between tables. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn