当前位置:首页 » 编程语言 » 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上加个触发器

热点内容
好看解压书 发布:2025-03-15 08:04:18 浏览:670
文字页游源码 发布:2025-03-15 08:02:29 浏览:313
怎么看自己微信密码 发布:2025-03-15 07:53:58 浏览:789
androidchecked 发布:2025-03-15 07:50:22 浏览:548
百度carplay怎么连接安卓手机 发布:2025-03-15 07:49:39 浏览:22
捕捉图片上传 发布:2025-03-15 07:49:01 浏览:794
手机内核升级编译 发布:2025-03-15 07:43:22 浏览:235
好java学校 发布:2025-03-15 07:43:22 浏览:134
搭建web服务器面试 发布:2025-03-15 07:43:16 浏览:263
sql查询as 发布:2025-03-15 07:36:04 浏览:208