You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a check constraint failed, I only see the this message every time:
....Check constraint 'chk__<column_name>' is violated.
How can I add a custom check constraint error message when a check is failed?
So I want...If check on `UserLevel` failed: I want to see: Check constraint 'chk__<userLevel>' failed: user level should be from 0 to 2OrIf check on `PriorityLevel` failed: I want to see: Check constraint 'chk__<priorityLevel>' failed: priority level should be from 0 to 5
In the normal SQL (MySQL) specifically, I think we can do this:
ADD CONSTRAINT
[Foo cannot be greater than Bar. Please be sure to check your foos and bars next time.]
CHECK (foo <= Bar)
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Your Question
Supposed I have a model:
When a check constraint failed, I only see the this message every time:
....Check constraint 'chk__<column_name>' is violated.
How can I add a custom check constraint error message when a check is failed?
In the normal SQL (MySQL) specifically, I think we can do this:
Thanks in advance!
The text was updated successfully, but these errors were encountered: