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 2: Databases and Tables Quiz
Answer all questions to test your understanding
1
What command creates a new database?
CREATE DATABASE
NEW DATABASE
ADD DATABASE
MAKE DATABASE
2
What does IDENTITY(1,1) do in a table definition?
Auto-increments the column starting from 1
Creates a primary key
Adds a foreign key
Makes the column nullable
3
What is the purpose of a PRIMARY KEY?
Uniquely identifies each row
Links two tables together
Allows duplicate values
Speeds up queries
4
What does NOT NULL mean in SQL?
The column cannot be empty
The column can be empty
The column must be unique
The column is a primary key
5
What command shows the structure of a table?
EXEC sp_help 'TableName'
SHOW TABLE TableName
DESCRIBE TableName
VIEW TableName
6
What does UNIQUE do in SQL?
Ensures no two rows have the same value in that column
Allows duplicate values
Creates a primary key
Creates a foreign key
Submit Quiz