It's easy to make a field required for inserts, just set it to not null
and don't give it a default.
But how does one make a field required for updates? For instance, we
have a table with a field that keeps track of which application last
updated the table
MYTABLE
------
ID PK
APPLICATION_ID
MORE_STUFF
I want to write a PL/SQL trigger that requires the application to
specify the appilication_id , and throw an error if the application fails
to provide a value. I.e. this SQL command should fail:
"UPDATE MYTABLE set MORE_STUFF = 'foo' WHERE ID = 123;"
IOW, how does one determine the update list in a PL/SQL trigger? I can
check to see if the value changed, but that won't do it.
--
//-Walt
//
//
Comment