-
Junior Member
Custom Error message
What would you use to place a not null constraint on a column? If the column is left blank on insertion, it should display a custom error message.
1. Rule
2. CHECK Contstraint
3. Triggers
4. Alter the table so that the column does not allow null
-
Junior Member
Re: Custom Error message
What would you use to place a not null constraint on a column? If the column is left blank on insertion, it should display a custom error message.
1. Rule
2. CHECK Contstraint
3. Triggers
4. Alter the table so that the column does not allow null[/QUOTE]
-
Re: Custom Error message
The best thing to do is to add a NOT NULL constraint on the column.
-
Junior Member
Re: Custom Error message
debasisdas,
How do you then display a custom error message?
If you check for null in a trigger you can raise it with raiseerror(), though not sure if it is the best way to do that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules