create table t1
( id int,[names] varchar(100))

create table t2
( id int,[names] varchar(100))

insert into t1 values(1,'t1');
insert into t1 values(2,'t2');
insert into t1 values(3,'t3');

insert into t2 values(1,'ttt1');

with temp(id,names) as
(
select id,names from t1
)

Merge into temp as a
Using t2 as b on a.id=b.id
when MATCHED THEN
Update SET a.names = b.names;

最新文章

  1. [APUE]文件和目录(上)
  2. SQL分隔字符串
  3. easyUI时间控件 使用
  4. MySQL学习
  5. cnblog中添加数学公式支持
  6. 数据库的Timeout
  7. android BroadcastReceiver
  8. 使用log4net
  9. php + Redis 写的类似于新浪微博的feed系统
  10. activiti自定义流程之Spring整合activiti-modeler5.16实例(一):环境搭建
  11. isMobile 一个简单的JS库,用来检测移动设备
  12. ASCII码常用值
  13. 转--object-C 与lua使用wax交互
  14. Rabbit hunt
  15. sqlserver 创建索引
  16. shell脚本之算术运算和逻辑运算
  17. Spring之Enterprise JavaBeans (EJB) integration
  18. Centos7通过SSH使用密钥实现免密登录
  19. ubuntu 安装kafka
  20. AGC 014E.Blue and Red Tree(思路 启发式合并)

热门文章

  1. Win10 系统 Mysql 安装
  2. 自定义异步IO框架
  3. [Kubernetes] Kubectl and Pod
  4. Centos7 源码安装PostgreSQL Citus集群 (转载)
  5. 转发标签forward
  6. loj #10131
  7. macos high sierra 删除多余的管理员的步骤
  8. C语言实现多线程排序
  9. Prometheus告警规则增删改自动化
  10. SQLServer 使用自定义端口连接的方法(转载)