创建触发器时出现 PLS-00049: 错误的赋值变量 ':NEW.land_name'
来源:互联网 发布:c语言选择排序算法 编辑:程序博客网 时间:2024/06/05 07:51
create or replace trigger t_hang_info
before insert or update or delete on hang_info
for each row
declare
pbCount number;
begin
select count(LANDID) into pbCount from TRADECENTER_LANDHANG where LANDID = :new.land_no;
if inserting or updating then
if pbCount<=0 then
insert into TRADECENTER_LANDHANG (
INFORID,
LANDID,
LANDNAME,
STARTTIME,
ENDTIME,
HIGHESTPRICE,
INCPRICE
) values (
:new.hang_no,
:new.land_no,
:new.land_name,
:new.hang_start_date,
:new.hang_end_date,
:new.hang_start_price,
:new.hang_inc_price
);
else
update TRADECENTER_LANDHANG set
INFORID = :new.hang_no,
LANDID = :new.land_no,
LANDNAME = :new.land_name,
STARTTIME = :new.hang_start_date,
ENDTIME = :new.hang_end_date,
--HIGHESTPRICE = :new.hang_start_price,
INCPRICE = :new.hang_inc_price
where landid = :new.land_no;
end if;
end if;
if deleting then
delete from TRADECENTER_LANDHANG where landid = :old.land_no;
end if;
end;
两个带颜色的地方报错
PLS-00049: 错误的赋值变量 ':new.land_name'
PLS-00049: 错误的赋值变量 ':new.land_name'
检查表结构后发现是我已经把land_name字段总表hang_info中删除了,所以造成这样的错误,加上之后就测试通过了。
- 创建触发器时出现 PLS-00049: 错误的赋值变量 ':NEW.land_name'
- 创建触发器时出现 PLS-00049: 错误的赋值变量 ':NEW.modify_man'
- Oracle 警告: 创建的触发器带有编译错误 错误的赋值变量
- oracle触发器编译错误PLS-00103
- 测试触发器时出现的错误
- PLS-00565的错误解决
- 使用bool 类型变量赋值时的一个错误
- oracle 创建的触发器带有编译错误
- oracle的PLS-00231 错误分析
- 内存错误:Address .... is on thread 1's stack 与创建变量时出现段错误
- Javascript中使用new ActiveXObject("WScript.Shell")创建对象,出现:Automation服务器不能创建对象的错误,其原因有
- ORACLE触发器和new、old特殊变量
- ORACLE触发器和new、old特殊变量
- ORACLE触发器和new、old特殊变量
- ORACLE触发器和new、old特殊变量
- Oracle触发器和new、old特殊变量
- Oracle触发器和new、old特殊变量
- The New C++ -- 变量 (2. 变量的赋值和输入)
- Windbg使用指南(1)---工具使用前的配置
- 中国红十字总会公布地震救灾专用账号和热线
- SQL Server数据库事务处理详解 TRANSACTION
- oracle数据库服务器体系结构
- java中究竟是传值还是传引用
- 创建触发器时出现 PLS-00049: 错误的赋值变量 ':NEW.land_name'
- 地震发生时,学生们在读书......
- 给删除按钮添加一个确认消息框(从服务端)
- Windbg使用指南(1)---常用命令
- 一个用C#编写的自动读写配置文件的开源组件
- Oracle导出PL/SQL Object定义
- HP大中华区总裁孙振耀退休感言
- Irrlicht系统学习---文件系统
- 什么是DBA