Access to all courses
Creating a Table - Constraints
Let's add some more rules to our nearly completed User table. We want to make sure we always have an email and name- so let's add a rule to our table. We can enforce that the values aren't empty by adding 'NOT NULL' to columns that we want to require a value. ```sql CREATE TABLE Users ( id INT PRIMARY KEY AUTO_INCREMENT,
The rest of this lesson is waiting.
Join JS Mastery Pro to unlock it.





Get Full Access
$149 /month
Lock in a year & save—2 months free!
Quizzes, mini-challenges, AI summaries, inline sandboxes
Participation in a private community
Build real production-grade apps
Mock interviews & project reviews
Weekly live sessions & member-only access