比较两个不同表的两个字段 [英] compare two fields of two different tables

查看:156
本文介绍了比较两个不同表的两个字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果没有,将一个表的两个字段与另一个表的两个字段进行比较。记录不一样吗?并计算两个表中的匹配行

how to compare two fields of one table to two fields of another table when no. of records are not same? and count the matching rows in both the tables

推荐答案

这可以帮助你:

This could help you:
select count(*) from 
TABLE_A A inner join TABLE_B B on (A.FieldA1=B.FieldB1 and A.FieldA2=B.FieldB2)


这篇关于比较两个不同表的两个字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆