Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re[2]: using User defined functions in Check constraint

Re[2]: using User defined functions in Check constraint

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Tue, 19 Jun 2001 19:44:11 -0700
Message-ID: <F001.0032F6E0.20010619192524@fatcity.com>

I agree w/Tom. Use the raise_application_error function when you want to make the triggering statement fail.

Best regards,

Jonathan Gennick
mailto:jonathan_at_gennick.com * 906.387.1698 http://Gennick.com * http://MichiganWaterfalls.com * http://MetalDrums.org

Tuesday, June 19, 2001, 1:59:34 PM, Tom Mercadente wrote:

MTF> While you can use any Oracle supplied function within a check constraint,
MTF> you cannot use a self-written function.  
MTF> But you can perform the same thing by using a database table trigger on
MTF> the
MTF> table itself.  You can basically validate anything you want from any
MTF> schema
MTF> you wish using a database trigger (with some exceptions).
 
MTF> A pre-insert trigger on the table would work just fine.  Check them out
MTF> in
MTF> the documentation.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Jonathan Gennick
  INET: jonathan_at_gennick.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Jun 19 2001 - 21:44:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US