Free SQL Server tutorials
Learn Microsoft SQL Server Step by Step
Practical SQL Server and T-SQL tutorials for beginners and working developers. Every guide walks you through the real query, the SSMS screens and the result, from creating your first database to stored procedures, indexes, permissions and the error messages that stop your work.
- 380+Free tutorials
- 13×Microsoft MVP author
- 18+ yearsHands-on experience
Learn by topic
SQL Server Tutorials from Beginner to Advanced
Each topic starts with one main tutorial, followed by the related lessons readers look for most. Work through them in order, or jump to what you need today.
Getting started
SQL Server Management Studio Basics
Install SQL Server and SSMS, connect to your first server and find your way around the query editor.
Databases & tables
Create a Database in SQL Server Management Studio
Create databases and tables, add primary keys and change a table's design without losing data.
Queries
SQL SELECT Query Examples
Read data the right way: filter rows, sort the results and group them into totals.
Joins
SQL JOIN Basics
Combine rows from two or more tables and pick the join that returns exactly the rows you need.
Stored procedures
Create a Stored Procedure in SQL Server
Write reusable T-SQL with parameters, IF…ELSE logic and safe changes to existing procedures.
User-defined functions
How to Create a Function in SQL Server
Build scalar and table-valued functions and know when a function beats a stored procedure.
Dates & times
SQL Server Get Current Date
Get today's date, add or subtract days and months, and format dates exactly how your report needs them.
Temp tables
Temp Table in SQL Server
Store intermediate results in local and global temp tables, and compare them with table variables and CTEs.
Indexes & performance
SQL Indexes
Create the right clustered and nonclustered indexes and speed up slow queries.
Views & triggers
SQL Server Views
Save complex queries as views and run code automatically with triggers when data changes.
Security
SQL Server Permissions
Create logins and users, grant only the access people need, and check who can do what.
Window functions
Window Functions in SQL Server
Number, rank and compare rows without collapsing them, using OVER and PARTITION BY.
Quick reference
SQL Server Built-in Functions with Examples
Look up the syntax, see a working example and copy the query for the functions you use every day.
String functions
Date functions
Conversion
Aggregate & logical
Troubleshooting
Fix Common SQL Server Errors
Seeing an error message? Find it below for the cause and the exact steps that fix it.
Connection & login
Query & data type
SSMS problems
What’s the difference?
Reader favorites
Popular SQL Server Tutorials
- SQL Cheat SheetReference
- SQL Server RoadmapLearning path
- How to Find Duplicate Records in SQLQueries
- How to Delete Duplicate Records in SQL ServerQueries
- PIVOT in SQL Server: Rows to ColumnsQueries
- CONVERT Function in SQL ServerFunctions
- Format Number with Commas in SQL ServerFunctions
- CASE Statement in SQL ServerT-SQL
- SQL Server Export Table to CSVTables
- SQL Server Error 18456: Login FailedError fix
- Download SSMSSSMS
- Advanced SQL Interview QuestionsInterview
Recently added
Latest SQL Server Tutorials
Free video tutorials
Learn SQL Server on YouTube
Prefer to watch? Subscribe to the Azure Lessons YouTube channel for step-by-step SQL Server, Azure SQL and SSMS video tutorials, with new lessons added regularly.




