x

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

more ▼

asked Jan 11, 2010 at 11:59 AM in Default

avatar image

OraLearner
1.3k 82 88 92

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Yes. For example:

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

Uses the UPPER function in a check constraint.

more ▼

answered Jan 11, 2010 at 01:32 PM

avatar image

Andrew Mobbs
1.6k 3 5

(comments are locked)
10|1200 characters needed characters left

Unless it is an user-defined function.

more ▼

answered Jan 07, 2011 at 03:49 PM

avatar image

temp
1

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x426
x56
x25
x25

asked: Jan 11, 2010 at 11:59 AM

Seen: 2180 times

Last Updated: Jan 12, 2010 at 12:36 PM

Copyright 2016 Redgate Software. Privacy Policy