当前位置:首页 » 编程语言 » sql对比两个表

sql对比两个表

发布时间: 2023-08-27 10:24:08

⑴ SQL如何对比两张表的数据

insert
into
tablea
select
*
from
tablea
where
not
exists
(selelct
'1'
from
tableb
where
tablea.serverid
=
serverid
and
tablea.driverid
=
driverid
and
tablea.driversize
=
driversize)
update
tablea
set
tablea.driversize
=
tablea.driversize
from
tablea
,tableb
where
tablea.serverid
=
serverid
and
tablea.driverid
=
driverid
如果你以tableb为准的话,你最好在tableb上加个触发器

热点内容
php集成支付宝 发布:2025-09-16 14:05:28 浏览:715
php的pregmatchall 发布:2025-09-16 14:04:43 浏览:434
片上缓存区 发布:2025-09-16 13:49:18 浏览:152
查验技巧脚本 发布:2025-09-16 13:41:59 浏览:726
安卓如何让应用隐藏 发布:2025-09-16 13:28:58 浏览:340
连接ftp异常中断 发布:2025-09-16 12:52:33 浏览:289
3m移动办公服务器地址大全 发布:2025-09-16 12:22:35 浏览:257
什么是直男的快乐密码 发布:2025-09-16 12:22:32 浏览:911
修改数据库存储引擎 发布:2025-09-16 12:21:48 浏览:78
安徽调度服务器品牌云服务器 发布:2025-09-16 12:02:17 浏览:778