加入收藏 | 设为首页 | 会员中心 | 我要投稿 甘南站长网 (https://www.0941zz.com/)- 科技、行业物联网、开发、云计算、云管理!
当前位置: 首页 > 数据库 > MsSql > 正文

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

发布时间:2021-03-30 11:11:45 所属栏目:MsSql 来源:互联网
导读:尝试在SSDT中做一些简单的数据比较,但证明有点困难. 在一个数据库中,我有两个我想要比较的表. 这些表具有相同的模式,只是不同的表名.我只是想看看这个工具是否能给我一个很好的方法来比较两者中的数据. 即 tblOutputtblOutput_210314 但是这个选择两个表在一

尝试在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.

(编辑:甘南站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读