Get Answers to all your Questions

header-bg qa

What do you understand by constraints in SQL ? what is their significance?

Answers (1)

best_answer

Data in a table follows the rule specified by a constraint. It controls and monitors the type of data in the table. It is specified at the time of table creation. 

Some common constraints used are :  

  • PRIMARY KEY 
  • NOT NULL 
  • FOREIGN KEY 
  • DEFAULT 
  • CREATE INDEX 
Posted by

Deependra Verma

View full answer