没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
试读
4页
在某个业务受理子系统BSS中, --客户资料表 create table customers ( customer_id number(8) not null, -- 客户标示 city_name varchar2(10) not null, -- 所在城市 customer_type char(2) not null, -- 客户类型 ... ) create unique index PK_customers on customers (customer_id) 由于某些原因,客户所在城市这个信息并不什么准确,但是在 客户服务部的CRM子系统中,通过主动服务获取了部分客户20%的所在 城市等准确信息,于是你将该部分信息提取至一张临时表中: create table tmp_cust_city ( customer_id number(8) not null, citye_name varchar2(10) not null, customer_type char(2) not null )
资源推荐
资源详情
资源评论
为了方便起见,建立了以下简单模型,和构造了部分测试数据:
在某个业务受理子系统 BSS 中,
--客户资料表
createtablecustomers
(
customer_idnumber(8)notnull,--客户标示
city_namevarchar2(10)notnull,--所在城市
customer_typechar(2)notnull,--客户类型
...
)
createuniqueindexPK_customersoncustomers(customer_id)
由于某些原因,客户所在城市这个信息并不什么准确,但是在
客户服务部的 CRM 子系统中,通过主动服务获取了部分客户 20%的所在
城市等准确信息,于是你将该部分信息提取至一张临时表中:
createtabletmp_cust_city
(
customer_idnumber(8)notnull,
citye_namevarchar2(10)notnull,
customer_typechar(2)notnull
)
1)最简单的形式
--经确认 customers 表中所有 customer_id 小于 1000 均为'北京'
--1000 以内的均是公司走向全国之前的本城市的老客户:)
updatecustomers
setcity_name='北京'
wherecustomer_id<1000
2)两表(多表)关联 update--仅在 where 字句中的连接
--这次提取的数据都是 VIP,且包括新增的,所以顺便更新客户类别
updatecustomersa--使用别名
setcustomer_type='01'--01为 vip,00 为普通
whereexists(select1
fromtmp_cust_cityb
whereb.customer_id=a.customer_id
)
3)两表(多表)关联 update--被修改值由另一个表运算而来
updatecustomersa--使用别名
setcity_name=(selectb.city_namefromtmp_cust_citybwhereb.customer_id=a.custo
资源评论
toice
- 粉丝: 6
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 重启进行BIOS快捷方式,不需要开机按BIOS键
- 威纶通触摸屏编程软件Easy builder pro V6.09.01.556安装包(2024.04).txt
- WindowsAdminCenter
- 老飞飞搭建基础通用数据库V19数据库.rar
- jquery.js
- 机械设计多工位ACF贴胶带&预压设备sw18可编辑非常好的设计图纸100%好用.zip
- 基于Pytorch复现Point-Transformer,用于ShapeNet数据集点云分割
- 【医学影像分析】2D超声图像的分割检测(Ultrasound Nerve Segmentation - Kaggle数据集)
- 嘎嘎香的五款神仙谷歌插件
- .arch书源导入教程.mp4
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功