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