Course Content

Course Content


SQL constraints are used to specify rules for the data in a table. Constraints are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the table. If there is any violation between the constraints, you will get an error message. They are similar to a field's property in a database.If there is any violation between the constraint and the data action, the action is aborted.

In this hindi free course SQL constraints are used to define the rules for data in a database. We use them to ensure data integrity and consistency, limit the consequences of user errors, and enforce business rules. There are three types of SQL constraints: column-level constraints, table-level constraints, and domain-range constraints. Column-level constraints typically refer to individual columns in a table or view. They can be used to specify that certain values are not allowed for that column or that all values in the column must be unique. This is done through specifying NULL values, UNIQUE indexes, PRIMARY KEYs (or UNIQUE), CHECKs (or NOT NULL), or FOREIGN KEYs as appropriate.

A constraint is a restriction on the type of data that can be stored in a column. The following are types of constraints: - NOT NULL: this constraint requires that every row have a value in the column. - UNIQUE: this constraint requires that there is only one row with any particular set of values. - PRIMARY KEY: this constraint is used to identify each row uniquely and to ensure that there can't be duplicate rows. - CHECK: this constraint allows you to specify an expression which must evaluate to true for the row to be inserted or updated, e.g., CONSTRAINT checkschema CHECK (name IS NOT NULL) - FOREIGN KEY: this constraint identifies each row uniquely on another table.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
App Store
397K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
13K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere