What are constraints in SQL?
Model answer
Rules that protect data quality: NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK (price > 0) and DEFAULT. Enforcing rules in the database means bad data is rejected no matter which application writes it.
Learn this topic
Keys and Table Design: Why Data Is Split Into Tables in the course SQL for Beginners: Learn Databases Step by Step.
Sign in to add your own answer.