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.

相关文章

SELECT a.*,b.dp_name,c.pa_name,fm_name=(CASE WHEN a.fm_n...
if not exists(select name from syscolumns where name=&am...
select a.*,pano=a.pa_no,b.pa_name,f.dp_name,e.fw_state_n...
要在 SQL Server 2019 中设置定时自动重启,可以使用 Window...
您收到的错误消息表明数据库 'EastRiver' 的...
首先我需要查询出需要使用SQL Server Profiler跟踪的数据库标...