mysql中查询两个类似表中不同的数据。

在开发时,经常会出现比较两张表中数据不同的情况,其中我们有两种方法。

第一种方法,比较简单,当两者表一样的时候。如下:两张表只有一个字段goodsCode

select goodsCode from oms where goodsCode not in (select goodsCode from sdorder)

第二种方法

https://blog.csdn.net/luyaran/article/details/80928666

猜你喜欢

转载自blog.csdn.net/wszhm123/article/details/86134376
今日推荐