开发者

vb6 msaccess sql

Suppose I merge two identical access tables with append query. How can I link it up with other tables? Since the primary key will be allotted fresh, how will the 开发者_如何转开发other related tables take up this primary key as its foreign key?


I would keep the original primary keys as "alternate keys", and add a new auto-numbered primary key to the resulting table (the merged one).

Then you'll need to drop the integrity rules on the tables with foreign keys into the original tables, and run updates on them to set their foreign keys to the value in the new primary key on the resulting table.

The re-establish the integrity rules between those tables and the resulting table, and drop the old alternate key and the old tables.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜