what is constraints? Also explain the different types of constraints?



what is constraints? Also explain the different types of constraints?..

Answer / Tanmay Singh

Constraints are rules that control the data inserted or updated in a database table. They help ensure the integrity and consistency of the data. The main types of constraints include PRIMARY KEY (unique, not null), UNIQUE (unique but may have NULLs), FOREIGN KEY (references another table's primary key), CHECK (defines valid values for columns), and DEFAULT (provides a default value when no value is specified).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

How can you create and drop view in mysql?

1 Answers  


What is delimiter in mysql trigger?

1 Answers  


What is view in mysql?

1 Answers  


How to Recover a MySQL root password. Stop the MySQL server process. Start again with no grant tables. Login to MySQL as root. Set new password. Exit MySQL and restart MySQL server.

1 Answers  


What is A BI Ap;plication?

1 Answers   HCL,


What is current version of mysql?

0 Answers  


Do I need python for mysql?

1 Answers  


How do you start and stop MySQL on Windows?

3 Answers  


How triggers can be used in mysql?

1 Answers  


How do I start mysql manually?

1 Answers  


What language is mysql written in?

1 Answers  


How can you add and remove any column of a table?

1 Answers  


Categories