check constraint is violated

Solutions on MaxInterview for check constraint is violated by the best coders in the world