on 2021 Apr 01 3:32 PM
In a trigger it is possible to reference old as oldRecord new as newRecord
Then it is possible to use oldRecord.column_name and newRecord.column_name
What type of "variables" are these oldRecord / newRecord?
For example I can't use oldRecord.* to copy all fields into a temp table. Because it does not know the table oldRecord.
But I could for example declare a variable orderRecord orders%rowtype and fill it with 1 given record using
select * into orderRecord from orders where id = 1
Now this orderRecord is acting similar to what oldRecord in the trigger would do.
Select orderRecord.* is not allowed but Select orderRecord.Id is allowed.
So is the oldRecord reference in a trigger similar as a variable declared as table_name%ROWTYPE?
Is there maybe an easy way to have this %ROWTYPE data stored into a table? Maybe by using TABLE REF?
User | Count |
---|---|
67 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.