刚才代码写错了,
我的代码
update xiujuan a,jiafu b set a.yxts = b.yxts
where a.id = b.no and b.yxts is not null and a.yxt is null ;可是好像不能用,问一下高手,是我的代码有问题吗,还是 就没有这个功能,就不能同时在两张表里update xiujuan a,jiafu b set a.ysts= b.yxts where a.id=b.no and b.yxts is not null and a.yxts is nul
*
ERROR 发生在第 1 行:
ORA-00971: 缺少 SET 关键字
我的代码
update xiujuan a,jiafu b set a.yxts = b.yxts
where a.id = b.no and b.yxts is not null and a.yxt is null ;可是好像不能用,问一下高手,是我的代码有问题吗,还是 就没有这个功能,就不能同时在两张表里update xiujuan a,jiafu b set a.ysts= b.yxts where a.id=b.no and b.yxts is not null and a.yxts is nul
*
ERROR 发生在第 1 行:
ORA-00971: 缺少 SET 关键字
解决方案 »
- ORACLE 函数问题 求解
- 在Oracle中不用组函数(max().....,order by)求一列的最大值(要讲究效率)
- 期待高手:往oracle上传大文件的问题。
- 求一sql语句
- 关系型数据库和非关系型数据库哪个更快?比如说我把一条记录按类型拆分到不同的表里,然后再查询出来。对比直接查询出一条记录哪个更快效
- 已知V_SUM:=$100,000+$250,000那么v_sum是什么类型?
- 关于Oracle Undo Segment问题
- oracle存贮过程是怎么了????
- 新手问题
- 哪里有ORACLE 806/805 FOR sco unix的下载!!!!!!
- 请教大家,怎么能用导出的sql文件在access中导入数据呢
- ORA-20000: buffer overflow, limit of 10000 bytes错误怎么处理?在线等待
where xiujuan.id = jiafu.no and jiafu.yxts is not null and xiujuan.yxt is null ;
*
ERROR 发生在第 1 行:
ORA-00936: 缺少表达式
++++++++++++++++++++++++++++++++++++++++++++ 1 update xiujuan set xiujuan.yxts = jiafu.yxts
2* where xiujuan.id = jiafu.no and jiafu.yxts is not null and xiujuan.yxts is null
where xiujuan.id = jiafu.no and jiafu.yxts is not null and xiujuan.yxts is null
*
ERROR 发生在第 2 行:
ORA-00904: 非法的列名++++++++++++++++++++++++++++++++++++++++++++update xiujuan A set YXTS=(select YXTS from jiafu B where A.NO=B.no)更新3个记录.SQL> select * from xiujuan;ID YXTS FL
---- ---- --
1 1 ye
2 2
3 3能通过,但是一次更新了,三条记录,运行的结果也算全对!!!原来是
SQL> select * from xiujuan;ID YXTS FL
---- ---- --
1 5 ye
2
3
前两个的我也不知道是怎么错的,
修改第三句的 增加条件 a.yxts is null and b.yxts is not null
运行的结果是:把 xiujuan 原来的第一条记录的 yxts 给搞成空的了!!! 不知道该怎么办了???SQL> update xiujuan A set YXTS=(select YXTS from jiafu B where A.id=b.no and a.yxts is null and b.yx
ts is not null);更新3个记录.SQL> select * from xiujuan;ID YXTS FL
---- ---- --
1 ye
2 2
3 3