Skip to content

Data Management & Databases

SQL Server Practice Test — 59 Free Questions

Practice questions on SQL Server.

Test your SQL Server knowledge with 59 multiple-choice questions. Choose an answer and you see at once whether it's right, with an explanation. Easy questions need no account.

Questions by level

  1. Easy 47 questions

    Open to everyone, no account needed.

  2. Medium 12 questions

    Sign in, then get 60% or more right on 10 easy questions.

Each level you clear earns a certificate you can share.

Practise with a free account

  • Your answers and progress are saved
  • Unlock Medium and Hard as you clear each level
  • XP, a daily streak and a certificate per level
Create a free account

What the SQL Server practice test covers

Questions on Microsoft SQL Server 2008 and Transact-SQL: data types, constraints and indexes, the sqlcmd utility, data compression, SQL Server Audit, encryption, the Resource Governor and DBCC commands.

Data types
date, time and datetime2 precision and ranges, decimal, spatial types, sparse columns, FILESTREAM and data type precedence.
Tables, constraints and indexes
PRIMARY KEY and clustered indexes, CHECK and FOREIGN KEY constraints, temporary tables, IDENTITY and ROWGUIDCOL.
T-SQL queries
TOP with a variable, GROUP BY with CUBE and GROUPING, common table expressions, comments and stored procedure calls.
sqlcmd
Connecting to a named instance, running a script file, saving output, passwords and login timeouts.
Administration and security
Row and page compression, SQL Server Audit objects and targets, Transparent Data Encryption, Resource Governor pools and permissions.
Maintenance
DBCC CHECKDB and CHECKIDENT, renaming a database and the Data Collector's management data warehouse.

How to prepare

Many questions show a short T-SQL snippet and ask for its output or for the valid syntax, so read the code line by line and watch the quotes, brackets and options. Practise in a test database where you can, because running the statement settles most doubts faster than memorising.

Good to know: The questions are written for SQL Server 2008. Most of the T-SQL still works in current versions, but defaults, limits and some features have changed since then.

Questions about SQL Server practice

How many SQL Server practice questions are there?

59 multiple-choice questions across 2 levels (easy and medium). New questions are added regularly.

Do I need an account to practise SQL Server?

No. Easy questions work straight away. A free account saves your answers and lets you unlock Medium and Hard: get 60% or more right on 10 questions of a level (or on all of them, if the level has fewer) to unlock the next.

Does every SQL Server question have an explanation?

Yes. After you choose an answer you see whether it was right, which option is correct and why. If you spot a mistake, use "Report a mistake" under the question.