C# Mastery Hub
Home
Challenges
Discussion
Lessons
Core Topics
C# Fundamentals
Console Applications
Classes & OOP
Windows Forms
ASP.NET Core
SQL Server
VS & SQL Connection
RDLC Reports
.NET MAUI
Getting Started
Getting Started
Website Development
SEO Guide
Security
Project Workflow
Extra Topics
Cloud & Deployment
AWS Cloud
Deployment
About
Contact
Test Your Knowledge
SQL Server - Lesson 3: Data Types & Constraints Quiz
Answer all questions to test your understanding
1
Which data type is used for whole numbers?
INT
DECIMAL
NVARCHAR
DATE
2
Which data type is used for text with variable length?
NVARCHAR
INT
DECIMAL
BIT
3
Which data type is used for money/decimal values?
DECIMAL
INT
NVARCHAR
DATE
4
What is the purpose of a CHECK constraint?
Restricts values to a valid range
Creates a primary key
Creates a foreign key
Allows null values
5
What is the purpose of a FOREIGN KEY constraint?
Enforces that a value must exist in another table
Creates a primary key
Restricts values to a range
Allows duplicates
6
What is DECIMAL(10,2) used for?
Numbers with 10 total digits and 2 decimal places
Numbers with 10 decimal places
Numbers up to 10
Text with 10 characters
Submit Quiz