What is Check Constraint in SQL|| SQL tutorial for beginners in Hindi Educate Cube

Поделиться
HTML-код
  • Опубликовано: 28 июн 2024
  • What is Check Constraint in SQL?
    #checkconstraint #checkconstraint #sqlserver
    Linkedin Group: / 14478259
    Hello everyone, welcome to Educate Cube. Today, we will learn about what a Check Constraint is in Educate Cube.
    A Check Constraint enforces conditions on the values allowed in a column. It ensures that the data being ingested meets specific criteria. Simply put, it means that the data we are ingesting should only be ingested if it meets certain conditions.
    For example, let's create a table for employees. Now, I want to ingest data only for those whose age is equal to or greater than 18. Ideally, in a company, there is no point in having data for someone who is less than 18 years old, as they are not eligible for a job until they are 18. This maintains a check.
    If, by chance, someone mistakenly enters an age less than 18, let's say someone is 27 but they entered 17, we can catch that error and prevent such data from being ingested. When this error is created, it will automatically alert us that the data has not been correctly aged.
    That's all for this video. Thank you for watching Educate Cube. Please like, share, and subscribe to our RUclips channel.

Комментарии •