Year End Sale: Get Upto 40% OFF on Live Training! Offer Ending in
D
H
M
S
Get Now

SQL Server: Not Null Constraint

Level : Beginner
Mentor: Shailendra Chauhan
Type : GuidedLab
Points : 10
Duration : 00:15:00

Lab Details

Description

NOT NULL specifies that NULL values are not accepted in a column. This constraint ensures that invalid data cannot enter the column. Adding a NULL value to a NOT NULL column will cause an error.

In this lab, you will learn how to add a Not Null Constraint to a table in SQL Server.


Based on this Customer and Supplier Schema, generate the solutions to the respective queries listed below:

  1. Create a customer table and the FirstName and LastName columns should not accept NULL values.
  2. Add a NOT NULL Constraint to ‘City’ Column in an existing Customer Table.

Lab Objective

Upon completion of this lab, you will be able to:

  • Gain Hands-On Experience on SQL Server NOT NULL Constraint.

Prerequisites

  • You should have a conceptual understanding of Constraints.
  • You must have SQL Server Installed on your systems.


Self-paced Membership
  • 24+ Video Courses
  • 825+ Hands-On Labs
  • 400+ Quick Notes
  • 125+ Skill Tests
  • 10+ Interview Q&A Courses
  • 10+ Real-world Projects
  • Career Coaching Sessions
  • Email Support
Upto 60% OFF
Know More
Still have some questions? Let's discuss.
CONTACT US
Accept cookies & close this