Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,在我的数据库中,“人类”由“姓名”和“年龄”字段组成。还有一个带有以下代码的触发器:
myObj := new human(); myObj.name := :new.name; myObj.age := :new.age;
myObj := new human();
myObj.name := :new.name;
myObj.age := :new.age;
SomeProc(myObj);
有没有办法写出类似的东西:
SomeProc((human):new)?
SomeProc((human):new)
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));