Home » SQL & PL/SQL » SQL & PL/SQL » stored procedure in a constraint?
stored procedure in a constraint? [message #10120] Tue, 06 January 2004 00:30 Go to next message
Pieter
Messages: 6
Registered: August 2002
Junior Member
Is it possible to call a procedure in a constraint?
Re: stored procedure in a constraint? [message #10132 is a reply to message #10120] Tue, 06 January 2004 02:46 Go to previous messageGo to next message
Barbara Boehmer
Messages: 9090
Registered: November 2002
Location: California, USA
Senior Member
No, you cannot call a procedure in a constraint. You can use an Oracle supplied function in a constraint. You can also use a user-defined deterministic function in a function-based index that can have the same effect as a constraint. Please provide more details as to what you wish to accomplish.
Re: stored procedure in a constraint? [message #10134 is a reply to message #10132] Tue, 06 January 2004 03:31 Go to previous messageGo to next message
Pieter
Messages: 6
Registered: August 2002
Junior Member
i want to make a stored procedure. This procedure must check if a day of birth is realistic. ( so it can not be greater than the current day, the sysdate)
for example when you want to insert 20/01/2004, sql must say that this is impossible!
Re: stored procedure in a constraint? [message #10137 is a reply to message #10134] Tue, 06 January 2004 03:41 Go to previous message
Barbara Boehmer
Messages: 9090
Registered: November 2002
Location: California, USA
Senior Member
What you need is a trigger. Please see previous response to the same question:

Previous Topic: Birthday check
Next Topic: stored procedure! help required!
Goto Forum:
  


Current Time: Fri Apr 26 00:37:55 CDT 2024