oracle中没这样的语法update a set a.id='1' where exists (select 1 from b where a.id=b.id);
解决方案 »
- Linux上的oracle虚拟机3.11重启后无法登录
- 无效id的问题。
- oracle 分区有用过的进来看看。。。有点疑问
- 请教南大通用数据库问题
- ORA-22804错误
- 求助,截取一NUMBER(10,2)类型整数部分前7位,小数点以及小数点后两位
- 初学者,向高手们请教
- 高手帮忙了,如何格式花数字为字符串,0.22 格式话成字符 0.22,有正符号怎么办??正的不显示,负数显示-0.22
- ORA-12514是什么错误?我一重启机器,配好的监听就报这个错?郁闷
- 通过表一中的num字段查询表二中num字段相等的数据,如果相等标识为1,不等标识为0
- 在线求助问题
- ORA-01401: 插入的值对于列过大
update a set a.id='1' from a inner join b on a.id=b.id;
能帮我看看这个sql语句怎么改吗?
begin
update c set isnew='1'
from table c inner join inserted i
on c.id=i.id
end
update c set isnew='1'
where exists( select 1 from inserted i where c.id=i.id);
end;
where exists(select 1 from inserted where inserted.id=table.id);
update table c set c.isnew='1'
where exists( select 1 from inserted i where c.id=i.id);
end;
我语句是触发器里的~inserted是SQL的临时表
FOR INSERT,update
AS
update operator set isnew='1'
where departid = (select id from vwdepartment where departflag='1')
if exists (select * from inserted)
begin
update c set isnew='1'
from operator c inner join inserted i
on c.departid=i.operationtypeid
end else
begin
update c set isnew='1'
from operator c inner join updated i
on c.departid=i.operationtypeid
end
这是SQL里的触发器代码
vwdepartment是试图
我只知道有INSERTED和DELETED
AFTER INSERT ON Accuse
FOR EACH ROW
BEGIN
update operator set isnew='1'
where departid = (select id from vwdepartment where departflag='1');
update operator set isnew='1'
where departid=:new.operationtypeid;
END;