微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

sql-server – Visual Studio SSDT数据比较如何比较单个数据库中的两个表

尝试在SSDT中做一些简单的数据比较,但证明有点困难.

一个数据库中,我有两个我想要比较的表.

这些表具有相同的模式,只是不同的表名.我只是想看看这个工具是否能给我一个很好的方法来比较两者中的数据.

tblOutput
tblOutput_210314

但是这个选择两个表在一个数据库中相互比较我看不出如何实现.

您似乎只能选择源数据库和目标数据库中存在的表名.由于我的源数据库和目标数据库是相同的,我基本上将我的表与自己进行比较?

有人知道通过Data Compare实现这一目标的方法吗?

> Visual Studio 2012
> sql Server数据工具
>数据比较

解决方法

Data Compare仅支持将2个不同的数据库与匹配的模式进行比较.遗憾的是,使用Data Compare无法实现您的目标.从 help documentation

Requirements

When you compare data in a table or view,the table or
view in the source database must share several attributes with a table
or view in the target database. Tables and views that do not meet the
following criteria are not compared and do not appear on the second
page of the New Data Comparison wizard:

  • Tables must have matching column names that have compatible data types.
  • Names of tables,views,and owners are case-sensitive.
  • Tables must have the same primary key,unique index,or unique constraint.
  • Views must have the same unique,clustered index.
  • You can compare a table with a view only if they have the same name.

原文地址:https://www.jb51.cc/mssql/74840.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐