Home » SQL & PL/SQL » SQL & PL/SQL » Can we call a stored function in the constraint of a table?
Can we call a stored function in the constraint of a table? [message #433246] Mon, 30 November 2009 23:58 Go to next message
priyasinha396
Messages: 15
Registered: November 2009
Location: Delhi
Junior Member
Can we call a stored function in the constraint of a table?
Re: Can we call a stored function in the constraint of a table? [message #433250 is a reply to message #433246] Tue, 01 December 2009 00:47 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Which kind of constraint?
What happened when you tried?

Database SQL Reference
Chapter 8 Common SQL DDL Clauses
Section constraint
Paragraph Restrictions on Check Constraints

Quote:
...
* Conditions of check constraints cannot contain the following constructs:
...
** Calls to user-defined functions
...


Regards
Michel
icon6.gif  Re: Can we call a stored function in the constraint of a table? [message #433346 is a reply to message #433246] Tue, 01 December 2009 13:38 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
You can allways create a TRIGGER.
Shocked
Re: Can we call a stored function in the constraint of a table? [message #433378 is a reply to message #433346] Wed, 02 December 2009 00:33 Go to previous message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I think this is just an interview/exam question (see the other questions from the same OP) and just need a direct answer from doc not a workaround.

Regards
Michel
Previous Topic: isDigit () method in PL/SQL
Next Topic: datatype for status like columns
Goto Forum:
  


Current Time: Fri Sep 30 00:29:14 CDT 2016

Total time taken to generate the page: 0.06420 seconds