匹配我有两个表:一个表有像city
,zipcode
和state
领域,我有了像zipcode
city
和state
如何验证,如果字段在两个表使用SQL
我需要的字段第二个表要比较的第二个表
例如:
当我运行反对为“新鲜草原” 1表查询,我得到的记录数:
Table1
city zipcode state
Flushing 11351 NY
Flushing 11354 NY
Flushing 11358 NY
Flushing 11365 NY
Flushing 11366 NY
...............................................
当运行存储过程对主表,对我比较,我得到的记录一些数量以及:
Table2
city zipcode state
Flushing 11370 NY
Flushing 11371 NY
Flushing 11372 NY
...............................................
我需要编写一个查询,可以帮助我找到那些城市表1与主表2中的邮政编码不匹配
我该如何做到这一点?
谢谢
我该如何写入sql?...仍在学习它:) –