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".
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.
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.
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.
#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.
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!