SQLancer
← All Database Flashcards Library / Flashcards / Microsoft SQL Server
💻 Microsoft SQL Server Knowledge Base

Microsoft SQL Server Study Flashcards

Microsoft's enterprise relational database system powered by T-SQL dialect. Click any card to flip and test your knowledge.

Card 1 of 10 Dialect

What is T-SQL?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

Transact-SQL (T-SQL) is Microsoft's extension to SQL adding procedural variables, string functions, and control flow.

Click to Flip Back ↶
Card 2 of 10 Queries

How does TOP (N) work in SQL Server?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

TOP (N) limits the number of output rows returned by a SELECT query.

Click to Flip Back ↶
Card 3 of 10 Temp Tables

What is the difference between #temp and ##temp tables?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

Single hash (#temp) is visible only to the current session. Double hash (##temp) is global and visible to all sessions.

Click to Flip Back ↶
Card 4 of 10 Joins

What is CROSS APPLY in T-SQL?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

CROSS APPLY invokes a table-valued function or correlated subquery for each row returned by an outer table query.

Click to Flip Back ↶
Card 5 of 10 Identity

How does IDENTITY(1,1) work?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

IDENTITY automatically generates auto-incrementing integer key values for new records.

Click to Flip Back ↶
Card 6 of 10 Administration

What is SQL Server Agent?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

A background service that executes scheduled administrative tasks, jobs, and automated backups.

Click to Flip Back ↶
Card 7 of 10 Functions

What is the difference between ISNULL and COALESCE?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

ISNULL accepts two arguments and uses data type of first argument. COALESCE accepts multiple arguments and returns highest data type precedence.

Click to Flip Back ↶
Card 8 of 10 Error Handling

What is TRY_CAST / TRY_CONVERT?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

Converts data to specified type and returns NULL if conversion fails instead of throwing a runtime error.

Click to Flip Back ↶
Card 9 of 10 Indexing

What is a Clustered Index in SQL Server?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

Defines the physical storage order of data rows on disk (only one clustered index per table).

Click to Flip Back ↶
Card 10 of 10 Aggregations

What is STRING_AGG in T-SQL?

Click Card to Reveal Answer ↷
Answer Microsoft SQL Server

Concatenates expression values with specified separator across dataset groups.

Click to Flip Back ↶

Need practical SQL queries for Microsoft SQL Server?

Explore our ready-to-use copy-paste query recipes in the Cookbook.

View Microsoft SQL Server Cookbook →