我们需要准备的材料分别是:电脑、sql查询器。
1、首先,打开sql查询器,连接上相应的数据库表,以product1表和product2表为例。

2、点击“查询”按钮,输入:select a.product, a.department, amount, cost from product1 a join product2 b on a.product=b.product and a.department=b.department。

3、点击“运行”按钮,此时就能得到不重复的联表结果。

时间:2026-02-14 17:49:47
我们需要准备的材料分别是:电脑、sql查询器。
1、首先,打开sql查询器,连接上相应的数据库表,以product1表和product2表为例。

2、点击“查询”按钮,输入:select a.product, a.department, amount, cost from product1 a join product2 b on a.product=b.product and a.department=b.department。

3、点击“运行”按钮,此时就能得到不重复的联表结果。
