question

OraLearner avatar image
OraLearner asked

Can we call a stored function in the constraint of a table ?

I would like to know whether we can call a stored function in a constraint of a table ? Thank you

oracleplsqlfunctionconstraint
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andrew Mobbs avatar image
Andrew Mobbs answered

Yes. For example:

ALTER TABLE emp ADD CONSTRAINT caseCheckConstraint CHECK ( UPPER(ename)=ename )

Uses the UPPER function in a check constraint.

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

temp avatar image
temp answered

Unless it is an user-defined function.

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.