oracle 用一表的字段更新另一表
来源:互联网 发布:土豆视频mac版下载 编辑:程序博客网 时间:2024/05/14 18:17
1. update (select .....) set column1 = column2;
update (select iy.company_name company_name1, cc.company_name_jc company_name2
from income_year_item iy , city_company cc
)
set company_name1 = company_name2;
2.只能单行子查询s
update CITY_PROJECT_SCALE_INFO c set
(c.value) = (
select d.value from CITY_PROJECT_SCALE_INFO @test d where d.project_id = '7d7fd580a06240b2a9137dc2bbe831e9'
and d.project_id = c.project_id and c.company_code = d.company_code
)
where exists (
select 1 from CITY_PROJECT_SCALE_INFO @test d where d.project_id = '7d7fd580a06240b2a9137dc2bbe831e9'
and d.project_id = c.project_id and c.company_code = d.company_code
)
3.使用merg inot 语句
--更新生产基础字段
merge into city_cfg_data_column_common cf1 using
city_cfg_data_column_common2 cf2 on
(cf1.resourceid = cf2.resourceid)
when matched then
update set cf1.template_type = cf2.template_type,
cf1.chinese_name = cf2.chinese_name,
cf1.column_name = cf2.column_name,
cf1.column_type = cf2.column_type,
cf1.column_size = cf2.column_size
when not matched then
insert (cf1.resourceid,cf1.template_type,cf1.chinese_name,cf1.column_name,cf1.column_type,cf1.column_size
,cf1.is_can_edit,cf1.is_unique,cf1.is_can_cover,cf1.show_order)
values (cf2.resourceid,cf2.template_type,cf2.chinese_name,cf2.column_name,cf2.column_type,cf2.column_size
,cf2.is_can_edit,cf2.is_unique,cf2.is_can_cover,cf2.show_order)
- oracle 用一表的字段更新另一表
- oracle把一个表的字段更新到另一张表中
- oracle将一个表的多个字段更新到另一张表里面
- 怎样将Oracle一张表的多个字段更新到另一张表中去
- 怎样将Oracle一张表的多个字段更新到另一张表中去
- 怎样将Oracle一张表的多个字段更新到另一张表中去
- Oracle一张表的多个字段更新到另一张表中去
- Oracle怎样将一张表的多个字段更新到另一张表中去
- Oracle用一个表的一个字段值去更新另一张表的某个字段值
- oracle数据库表备份和表恢复 怎样将Oracle一张表的多个字段更新到另一张表中去
- 用一个表的字段更新另一张表(转)
- sql更新字段值等于另一张表的值
- Oracle 更新一张表中某个字段等于另一张表中的某个字段
- 如何oracle 某一用户授予查询另一个用户某张表的权限,以及更新另一用户表中某些字段
- Oracle数据库,将日期更新为另一日期字段的年月日,不改时分秒
- SQL从一张表的某个字段更新为另一张表的字段
- mysql同一张表的字段更新到另一张表的字段
- 关于用一张表的字段更新另一张表的字段
- 需求规格说明书(ISO标准版)-需求分析类
- 一个完整的具备seo网站构成元素整理札记
- iphone-common-codes-ccteam源代码 CCUIKit.h
- iphone-common-codes-ccteam源代码 CCUIKit.m
- iphone-common-codes-ccteam源代码 CCUILabel.h
- oracle 用一表的字段更新另一表
- 在myeclipse中, 如何还原默认窗口?
- CreateThread(...)传入多个参数
- boost之Tokenizer
- 使用 LumiSoft.Net.POP3.Client 接收邮件
- Linux系统内存错误产生的原因及调试方法(段错误|core dumped)
- 用jquery判断浏览器低于ie6版本
- SQLite 3 一些基本使用
- {dede:list} [field:description] 限制长度