I would like to know whether we can call a stored function in a constraint of a table ? Thank you
Jan 11, 2010 at 11:59 AM
Jan 12, 2010 at 12:36 PM
Yes. For example:
ALTER TABLE emp ADD CONSTRAINT caseCheckConstraint CHECK ( UPPER(ename)=ename )
Uses the UPPER function in a check constraint.
Jan 11, 2010 at 01:32 PM
Unless it is an user-defined function.
Jan 07, 2011 at 03:49 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
Need long-form SQL discussion? SQLserverCentral.com is the place.
asked: Jan 11, 2010 at 11:59 AM
Seen: 1854 times
Last Updated: Jan 12, 2010 at 12:36 PM
Need help with Oracle Function to calculate values
Can we skip certain columns while loading data ?
What are cascading triggers? What is the maximum no of cascading triggers at a time?
How does one load multi-line records?
What are the various types of parameter modes in a procedure ?
Can Check constraint be used for self referential integrity ? How ?
Difference between case and code statements in oracle?
Can 2 functions have the same name & input parameters but differ only by return datatype ?
Oracle DDL in autonomous transaction