我有下面的一个批处理更新的SQL Server的语句,请问转到Oracle的语法是怎样的?
这句SQL的含义是,用b表与a表关联,满足条件的a表的记录的字段用B表更新。如果不能实现这个,岂不是样定义Cursor来循环?UPdate tOperAll set fEmplName = b.EMPNAME ,fPWD = b.PassWord
from tOperAll a ,Employee b
Where a.EMPNO = b.fEmplNo
and a.fSysNo = '1'哪位大侠能否提供一些Oracle的SQL写法的例子,包括左连接,右连接,子查询等内容,谢谢。
这句SQL的含义是,用b表与a表关联,满足条件的a表的记录的字段用B表更新。如果不能实现这个,岂不是样定义Cursor来循环?UPdate tOperAll set fEmplName = b.EMPNAME ,fPWD = b.PassWord
from tOperAll a ,Employee b
Where a.EMPNO = b.fEmplNo
and a.fSysNo = '1'哪位大侠能否提供一些Oracle的SQL写法的例子,包括左连接,右连接,子查询等内容,谢谢。
解决方案 »
- 一个关于Oracle的ODBC问题
- pl/sql错误
- 一个简单的sql修改(送200分)
- 在关闭服务器之前,有必要先shutdown数据库吗?
- 同义词的表在存储过程编译时报错:table or view does not exist
- ***<原创>***oracle数据库转换到Sqlserver的几点经验
- 请教:为什么不能连接上oracle数据库?
- 对一个系统功能菜单的权限划分,在建表时怎么实现?谢谢
- 程序执行慢,经检查程序始终在查询某个表中的数据,该表数据量很大,请分析原因,以及解决办法,写出分析流程
- 创建视图并按指定条件截去某字段的前几个字符
- 为什么自动管理回退表空间的数据文件增长如此快?
- oracle 访问MS SQL Server的网关配置
update (select a.*,b.* from tOperAll a ,Employee b
where a.EMPNO = b.fEmplNo
and a.fSysNo = '1') set fEmplName =EMPNAME ,fPWD = PassWord
update tOperAll a set fEmplName =(select EMPNAME from Employee b
where Where a.EMPNO = b.fEmplNo
and a.fSysNo = '1'),fPWD =select PassWord from Employee b
where Where a.EMPNO = b.fEmplNo
and a.fSysNo = '1');
这样比较罗索
select b.EMPNAME,b.PassWord
from Employee b
Where a.EMPNO = b.fEmplNo
and a.fSysNo = '1')
where exits(select b.EMPNAME,b.PassWord
from Employee b
Where a.EMPNO = b.fEmplNo
and a.fSysNo = '1')
fEmplName = (select b.EMPNAME from Employee b Where a.EMPNO = b.fEmplNo ),
fPWD = (select c.PassWord from Employee c Where a.EMPNO = c.fEmplNo )
where a.fSysNo = '1'没调过,试试吧
(fEmplName,fPWD) = (select b.EMPNAME,b.PassWord from Employee b Where a.EMPNO = b.fEmplNo )
where a.fSysNo = '1'
UPdate tOperAll a set
(fEmplName,fPWD) = (select b.EMPNAME,b.PassWord from Employee b Where a.EMPNO = b.fEmplNo )
where a.fSysNo = '1'
where a.EMPNO = b.fEmplNo
and a.fSysNo = '1') set fEmplName =EMPNAME ,fPWD = PassWord这种写法还是第一次看见,真是长见识了!
where a.EMPNO = b.fEmplNo
and a.fSysNo = '1') set fEmplName =EMPNAME ,fPWD = PassWord 这种写法效率应该比较好,普通的写法是什么?
where a.EMPNO = b.fEmplNo
and a.fSysNo = '1') set fEmplName =EMPNAME ,fPWD = PassWord 这种写法效率应该比较好,普通的写法是什么?
set x.尚欠发应付原因 = ( select h.欠款原因 from 欠款原因0304 h where trim(x.合同号) = trim(h.合同号) )
where trim(x.合同号) = '03-1207A';