Before - Before table or record event
After - After table or record event
Why does that confuse you?
they confuse me becouse
when we insert any record into the table they
inserted while using before or after
in both the cases the record is insert into the table.
that's why i'm confuse. so,tell me when we use the "before trigger"
and when "after trigger"....
The record is going into the database.
a) What do you want to happen just before the record is inserted.
This is usually used to populate; a primary key, an audit column, etc.
b) What do you want to happen just after the record is inserted.
This might be used to insert another record (related to this one) into another table.
Either way (unless there is an error), the record is going into the table.
You can also write before and after triggers on deletions and updates.
Those are the six common table triggers.
They can be written "For Each Row" or for a single transaction.
If you're in one of those predicaments where cls.__private attributes just aren't enough since they can easily be accessed through inst._cls__private, and you need something a little more secure, here's ...