Section 1 - Instruction

You've learned how to create tables and enforce data quality with NOT NULL, DEFAULT, and IDENTITY. Now it's time to combine these skills to build truly robust tables from scratch.

Engagement Message

Let's put your knowledge to the test. Ready to practice?

Section 2 - Practice

Type

Fill In The Blanks

Markdown With Blanks

Fill in the blanks to create a products table where the ID is auto-generated, the name is required, and the price defaults to 0 if not specified.

Suggested Answers

  • IDENTITY
  • NOT NULL
  • DEFAULT
Section 3 - Practice

Type

Sort Into Boxes

Practice Question

Sort these column definitions based on whether they are well-defined or poorly-defined for a production database.

Labels

  • First Box Label: Well-Defined
  • Second Box Label: Poorly-Defined

First Box Items

  • user_id INT IDENTITY NOT NULL
  • created_at DATE DEFAULT CURRENT_DATE
  • log_message VARCHAR(255) NOT NULL

Second Box Items

  • email VARCHAR(100)
  • status
  • first_name VARCHAR(50)
Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal