当前位置:网站首页>sqlserver 对比两张表的差异
sqlserver 对比两张表的差异
2022-08-01 07:37:00 【CSDN问答】
sql server
Except可以对比两个表的差异,那还能不能更进一步的知道是哪个字段存在差异?
create table test1
(name varchar(20),age int,sex varchar(5),tel varchar(20))
create table test2
(name varchar(20),age int,sex varchar(5),tel varchar(20))
insert into test1 values
('张三','20','男','123456'),
('李四','22','女','135791')
insert into test2 values
('张三','20','女','123456'),
('李四','22','女','135791')
/对比知道张三的数据发生了变化/
select * from test1
except
select * from test2
怎么再更进一步知道是哪个字段发生了变化?只能一个个字段对比吗?
边栏推荐
- 插入排序—直接插入排序和希尔排序
- Summary of test points about app updates in different ways
- 支付宝如何生成及配置公钥证书
- [Tear AHB-APB Bridge by hand]~ Why aren't the lower two bits of the AHB address bus used to represent the address?
- centos 安装php7.4,搭建hyperf,转发RDS
- app 自动化 打开app (二)
- Case practice --- Resnet classic convolutional neural network (Mindspore)
- JVM: Runtime Data Area - PC Register (Program Counter)
- MATLAB程序设计与应用 2.5 MATLAB运算
- Offer刷题——1
猜你喜欢

Offer刷题——1

Vim三种模式

Practical training Navicat Chinese and English mode switching

USB 协议 (二) 术语

The log causes these pits in the thread block, you have to prevent

如何使用Photoshop合成星轨照片,夜空星轨照片后期处理方法

I have three degrees, and I have five faces. I was "confessed" by the interviewer, and I got an offer of 33*15.

配置我的kitty

Three aspects of Ali: How to solve the problem of MQ message loss, duplication and backlog?

SaaS安全认证综合指南
随机推荐
SaaS安全认证综合指南
pytest接口自动化测试框架 | 使用函数返回值的形式传入参数值
三维坐标系距离
Vim扩展内容
关于App不同方式更新的测试点归纳
零代码网站开发利器:WordPress
微信小程序请求封装
小程序更多的手势事件(左右滑动、放大缩小、双击、长按)
搜索框字符自动补全
我的创作纪念日
POJ2421道路建设题解
【一句话攻略】彻底理解JS中的回调(Callback)函数
pytest接口自动化测试框架 | 集成Allure测试报告
Chapters 6 and 7 of Huawei Deep Learning Course
【杭电多校第四场 B题】最短路图+缩点dp
VoLTE Basic Learning Series | Enterprise Voice Network Brief
The use of Golang: go template engine
Shell执行SQL发邮件
国内外最顶级的8大plm项目管理系统
app 自动化 通过工具查看app 元素 (三)