Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: CONSTRAINT and user defined Function
Marcin Zawadzki wrote:
> I've got a problem.
> I wanted to use my own function in check constraint statement, but Oracle do
> not recognize my function name.
>
> The problem is:
> I have a table like that:
>
> ID APLICATION MAIN
> 1 app1 T
> 2 app2 T
> 2 app1 F
> 3 app1 T
> 3 app3 F
> 3 app4 T
>
> And have to check if there is only one main application (main = 'T') per
> user.
>
> Please HELP !
>
> MZ
For what you are trying to do a check constraint is not appropriate. Put your code into a trigger.
Daniel Morgan Received on Fri Aug 23 2002 - 11:52:31 CDT