-1

例如,在我的数据库中,“人类”由“姓名”和“年龄”字段组成。还有一个带有以下代码的触发器:

myObj := new human(); myObj.name := :new.name; myObj.age := :new.age;

SomeProc(myObj);

有没有办法写出类似的东西:

SomeProc((human):new)?

4

1 回答 1

1

If there is no need to keep a variable of an object instance in the trigger body for further reference, yes you can do an implicit call of default constructor the following way:

SomeProc(MyObj(:new.name, :new.age));
于 2013-10-10T14:49:07.663 回答