All questions
Showing of 47What is SQL Server and what are its main components?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
SQL Server is Microsoft's relational database management system (RDBMS), queried with T-SQL, Microsoft's dialect of SQL. It runs on Windows and Linux, and Azure SQL Database runs the same engine in the cloud. Its main components are:
- The Database Engine, the core service for storing, processing and securing data.
- SQL Server Agent, for job scheduling and automation.
- SQL Server Integration Services (SSIS), for data integration and transformation.
- SQL Server Analysis Services (SSAS), for analytical models. Its data mining feature was discontinued in SQL Server 2022.
- SQL Server Reporting Services (SSRS), for reports. From SQL Server 2025, on-premises reporting moves to Power BI Report Server.
SQL Server Management Studio (SSMS) is the main management and development tool. It is a separate client tool that also manages Azure SQL Database.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are the different data types in SQL Server?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
SQL Server groups its data types by what they hold, mainly numbers, strings and dates. The type decides how much space a column takes and which values it accepts.
- Exact numbers:
TINYINT,SMALLINT,INT,BIGINT,DECIMAL,NUMERIC,MONEY - Approximate numbers:
FLOAT,REAL - Strings:
CHAR,VARCHAR,NCHAR,NVARCHAR - Dates and times:
DATE,TIME,DATETIME,DATETIME2,SMALLDATETIME,DATETIMEOFFSET - Binary:
BINARY,VARBINARY - Special:
BIT,UNIQUEIDENTIFIER,XML
TEXT, NTEXT and IMAGE still exist, but they are deprecated. New code uses VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) instead.
SQL Server 2016 added JSON functions for JSON stored in NVARCHAR strings. A native JSON data type arrived only in SQL Server 2025 and Azure SQL Database.
Example:
CREATE TABLE Employee (
ID INT,
Name NVARCHAR(50),
Salary DECIMAL(10,2),
HireDate DATETIME
);
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is the difference between VARCHAR and NVARCHAR?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
VARCHAR stores non-Unicode text in the code page of the column's collation, the character set that collation supports. NVARCHAR stores Unicode text, so it can hold any language.
VARCHAR(n):nis a size in bytes, up to 8,000. With a single-byte collation such as a non-UTF-8 Latin one, each character takes 1 byte. It suits text that fits one code page, such as English.NVARCHAR(n):nis a size in byte-pairs, up to 4,000. Most characters take 2 bytes. Supplementary characters, those outside the basic Unicode range such as many emoji, take 4.
NVARCHAR needs more storage but supports international text. Unicode literals need the N prefix, as in N'Zürich', or they are converted to the database code page and can lose characters. From SQL Server 2019, a UTF-8 collation lets VARCHAR store Unicode too.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain different types of JOIN operations.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A join combines rows from two tables based on a related column, and the join type decides what happens to rows that have no match.
INNER JOINreturns only the rows that match in both tables.LEFT JOINreturns all rows from the left table and the matching rows from the right.RIGHT JOINreturns all rows from the right table and the matching rows from the left.FULL OUTER JOINreturns all rows from both tables, withNULLwhere a side has no match.CROSS JOINreturns the Cartesian product, every row paired with every row.
Rows with a NULL join key never match, so an inner join drops them.
T-SQL adds CROSS APPLY and OUTER APPLY, which run a table-valued function or subquery once for each left row. CROSS APPLY keeps only left rows that get a result, and OUTER APPLY keeps every left row, with NULL when nothing comes back.
Example:
-- INNER JOIN
SELECT e.Name, d.DepartmentName
FROM Employees e
INNER JOIN Departments d ON e.DeptID = d.ID;
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are PRIMARY KEY and FOREIGN KEY constraints?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A PRIMARY KEY uniquely identifies each row in a table, and a FOREIGN KEY makes a column refer to another table's primary key. A primary key can't be NULL, it must be unique, and a table has only one. SQL Server enforces it with a unique index, clustered by default when the table has no clustered index yet.
A foreign key rejects a value with no matching primary key in the parent table, though NULL is allowed. By default, deleting a parent row that still has child rows fails with an error. With ON DELETE CASCADE, the child rows are deleted too, and with ON DELETE SET NULL, their foreign key becomes NULL.
Example:
CREATE TABLE Departments (
ID INT PRIMARY KEY,
Name NVARCHAR(50)
);
CREATE TABLE Employees (
ID INT PRIMARY KEY,
Name NVARCHAR(50),
DeptID INT FOREIGN KEY REFERENCES Departments(ID)
);
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is the difference between DELETE, TRUNCATE, and DROP?
What are indexes and why are they important?
What is a View in SQL Server?
What are Stored Procedures and their advantages?
What is normalization, and what are the normal forms?
What is the difference between UNION and UNION ALL?
Explain the difference between clustered and non-clustered indexes.
What are window functions and how do they work?
Explain transaction isolation levels in SQL Server.
What are triggers and what types exist?
Explain different types of backups in SQL Server.
What are CTEs (Common Table Expressions)?
What is deadlock and how can it be prevented?
Explain the MERGE statement.
What are user-defined functions and their types?
What is the difference between a temporary table and a table variable?
What is Query Store and how does it help with performance tuning?
How do you manage index fragmentation in SQL Server?
How do you handle errors in a T-SQL stored procedure?
What is the difference between EXEC and sp_executesql for dynamic SQL?
What is the difference between a function and a stored procedure in SQL Server?
What are the different types of replication in SQL Server?
What is log shipping in SQL Server, and how does it work?
What are statistics in SQL Server, and how are they kept up to date?
How do you analyze and optimize query performance?
Explain table partitioning and its benefits.
Explain Always On Availability Groups.
What is parameter sniffing and how do you handle it?
Explain columnstore indexes and their use cases.
What are memory-optimized tables (In-Memory OLTP)?
How do you implement and manage database security?
Explain query hints and when to use them.
What are Extended Events and how are they used for monitoring?
How do you handle large data migrations and ETL processes?
Explain the difference between SNAPSHOT isolation and READ COMMITTED SNAPSHOT.
What is Resource Governor and how is it used?
How do you implement database compression in SQL Server?
What are Filegroups and how do you use them effectively?
What is tempdb used for, and how do you configure it?
How do you use wait statistics to troubleshoot SQL Server performance?
What types of locks does SQL Server use, and what is lock escalation?
What is the difference between a latch and a lock in SQL Server?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
42 of 47 SQL Server answers are in Pro.
Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.
- Full answers + code
- AI explanations, simpler or deeper
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsDjango
Python Full-Stack DevelopmentRuby on Rails
Convention over ConfigurationServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQInterviewers also test these - they're common to every stack, whichever one you picked above.
FastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDInterviewers also test these - they're common to every stack, whichever one you picked above.
AI Engineer
LLMs, RAG, Agents, EvalsAI-Powered Developer
Claude Code, Copilot, Agentic WorkflowsCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.