Create error message for check constraint

5 pts.
Tags:
check constraint
I was wondering if there was a way to create an error message that displays when data is entered into a table in the wrong format. (Check constraint).
ASKED: March 16, 2008  2:51 AM
UPDATED: September 30, 2008  6:06 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

When data is entered into a column of the wrong data type an error will be returned already.

For example is a column has the data type of INT and you try to put text data into the column the database will return an error message.

If you want a text field and you add a constraint to it and the new value does not meet the requirements of the constraint an error message will return an error message.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following