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.
What is T-SQL?
Transact-SQL (T-SQL) is Microsoft's extension to SQL adding procedural variables, string functions, and control flow.
How does TOP (N) work in SQL Server?
TOP (N) limits the number of output rows returned by a SELECT query.
What is the difference between #temp and ##temp tables?
Single hash (#temp) is visible only to the current session. Double hash (##temp) is global and visible to all sessions.
What is CROSS APPLY in T-SQL?
CROSS APPLY invokes a table-valued function or correlated subquery for each row returned by an outer table query.
How does IDENTITY(1,1) work?
IDENTITY automatically generates auto-incrementing integer key values for new records.
What is SQL Server Agent?
A background service that executes scheduled administrative tasks, jobs, and automated backups.
What is the difference between ISNULL and COALESCE?
ISNULL accepts two arguments and uses data type of first argument. COALESCE accepts multiple arguments and returns highest data type precedence.
What is TRY_CAST / TRY_CONVERT?
Converts data to specified type and returns NULL if conversion fails instead of throwing a runtime error.
What is a Clustered Index in SQL Server?
Defines the physical storage order of data rows on disk (only one clustered index per table).
What is STRING_AGG in T-SQL?
Concatenates expression values with specified separator across dataset groups.
Need practical SQL queries for Microsoft SQL Server?
Explore our ready-to-use copy-paste query recipes in the Cookbook.