Skip to content

The query is for a check constraint that is utilized for a table based on products. The goal is to ensure that attempts to add into the products table follow the guidelines of the constraint written

Notifications You must be signed in to change notification settings

YonathanTE/MIS410_Check_Constraint_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Check Constraint

The query is for a check constraint that is utilized for a table based on products with SQL Server 2014. The goal is to ensure that attempts to add into the products table follow the guidelines of the constraint written.

Guidelines

Write SQL to create appropriate check constraints for the following table: TABLE: Product

  • Category may be NULL or it is one of two values 'Perishable' or 'Durable'
  • Subcategory is always NULL if category is NULL
  • UPC_CODE is always 32 characters and is allowed to have only alphabets, digits, hyphen
  • dateIntroduced cannot be more than 6 months into the future

Entity Relationship Diagram

ERD

About

The query is for a check constraint that is utilized for a table based on products. The goal is to ensure that attempts to add into the products table follow the guidelines of the constraint written

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published