Required field for updates
From: Walt <walt_at_boatnerd.com.invalid>
Date: Thu, 24 Jul 2003 11:12:43 -0400
Message-ID: <3F1FF76B.43264144_at_boatnerd.com.invalid>
Date: Thu, 24 Jul 2003 11:12:43 -0400
Message-ID: <3F1FF76B.43264144_at_boatnerd.com.invalid>
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
"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.
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:
--Received on Thu Jul 24 2003 - 17:12:43 CEST
//-Walt
//
//