update table1 a set a.type = (select type from table2 where type = substr(a.type,1,1))
解决方案 »
- pl/sql developer 导出数据的三种方式有和区别?
- 这个oracle的分页存储过程 SQLTools 怎样执行下
- sql的统计疑难问题
- createEnvironment没有抛异常也没有返回,塞住不动了
- ORA-00906: 缺少左括号
- 关于connect by的问题
- 求教一个菜鸟问题 数据导入。。急救啊!.dmp
- Oracle9i Drop表和新增表时 ORA-00604错误
- 连接oracle数据库显示The Network Adapter could not establish the connection
- orcal如何判断查询截取的字符串是否等于某个字符串
- 高分求救!找叶子节点!
- pro*c/c++与c++编程使用c++标准库的问题
update table1 a set type=nvl((select name from table2 where type = substr(a.type,1,1)),type)如果是在table1中type有找到table2中的type就更新那么,
update table1 a set type=nvl((select name from table2 where instr(a.type,type)>0),type)
请问nv1是什么意思啊
where exists (select 1 from table2 b where instr(a.type,b.type)=1);或者update table1 a set a.type=(select b.name from table2 b where a.type like b.type||'%')
where exists (select 1 from table2 b where a.type like b.type||'%');
如果这样写的话,不就全替换成“其他”了吗?