update select 多字段
update Countrys set (
Abbreviation_cn,
Abbreviation_en,
Two_code,Three_code,
Number_code)=
(select [cn_name],
[en_name],
[two_code],
[free_code],
convert(int,number_code) as [number_code]
from Country.dbo.worlds a where a.cn_name=Countrys.Abbreviation_cn)
UPDATE Countrys SET Abbreviation_cn= Country.dbo.worlds.cn_name,
Abbreviation_en=Country.dbo.worlds.en_name,
Two_code=Country.dbo.worlds.two_code,Three_code=Country.dbo.worlds.free_code
FROM Countrys,Country.dbo.worlds WHERE Countrys.chinese_name+' '+Countrys.english_name = Country.dbo.worlds.all_name
update select 多字段的更多相关文章
- insert、update select from
1.insert select from <一棵树-博客园> 收集整理,转载请注明出处! 使用SELECT INTO 和 INSERT INTO SELECT 表复制语句了. 1.INSE ...
- update select
update中加入select 最常用的update语法是:UPDATE <table_name>SET <column_name1> = <value>, SET ...
- SQL update select
SQL update select语句 最常用的update语法是: UPDATE TABLE_NAME SET column_name1 = VALUE WHRER column_name2 = V ...
- SQL update select结合语句详解及应用
QL update select语句 最常用的update语法是: 1 2 UPDATE TABLE_NAME SET column_name1 = VALUE WHRER column_name2 ...
- SQL update select语句
SQL update select语句 最常用的update语法是:UPDATE <table_name>SET <column_name1> = <value>, ...
- 数据库 update select 多列操作
最常用的update语法是: UPDATE <table_name> SET <column_name1> = <value>, SET <column_ ...
- SQL SERVER的update select语句的写法
需求: 要根据表A的数据来更新表B的某些字段,A和B要进行条件关联. 常规做法可能写个子查询 简单写法是用SQL Server的update select语法 update T_STOCK_INFO ...
- 妙用Update Select
update PipeLine set PipeLine_Key = PipeLine.RegionCode + '|' + PipeLine.S_Point + '|' + PipeLine.E_P ...
- ORACLE 关连更新 update select
总结: 关键的地方是where 语句的加入. 在11G中, 如果不加11G , 或造成除匹配的行数更新为相应的值之后, 其余的会变成负数. 所以, 测试的办法就是: 先查看需要更新的数量即连接的数 ...
随机推荐
- Python 获取CentOS主机信息
Python 获取主机IP地址 #!/usr/bin/env python #coding:utf-8 import os ip=os.popen("ifconfig eth0|grep ' ...
- Eclipse文件首部自动加 作者时间
Window -> Preferences -> Java -> Code Style -> Code templates -> (in right-hand pane) ...
- linux drwxr-xr-x 是什么意思
linux drwxr-xr-x 第一位表示文件类型.d是目录文件,l是链接文件,-是普通文件,p是管道 第2-4位表示这个文件的属主拥有的权限,r是读,w是写,x是执行. 第5-7位表示和这个文件属 ...
- python程序的输入输出(acm的几个小程序)
1, A+B Problem : http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1000 #! ...
- C#页面前台<%%><%#%><%=%>
ASP.net前台绑定用的最多,今天小小总结一下. 1:<%#Eval("")%> 2:<%#Bind("")%> 3:<%=变量 ...
- C# Bitmap转化为BitmapImage方法
public BitmapImage BitmapToBitmapImage(Bitmap bitmap) { Bitmap bitmapSource = new Bitmap(bitmap.Widt ...
- mysql 中 时间和日期函数
From: http://www.cnblogs.com/redfox241/archive/2009/07/23/1529092.html 一.MySQL 获得当前日期时间 函数 1.1 获得当前日 ...
- 如何获取模拟器安装的app的位置
你可以死记下地址格式, 但是一旦不同的xcode和模拟器版本改变变了地址, 又得记, 从活动管理器里其实是可以直接查看的: Launch the app in the simulator Open A ...
- 【DeepLearning】汉字手写体识别
http://blog.topspeedsnail.com/archives/10897 两个双卷积池化 + dropout + 2个全链接 + softmax
- rsync:重要的安全参数
---------------------------------------------------------------------------------------------------- ...