SQL Server tutorials
SQL Server Tutorials: Learn T-SQL Step by Step
Every SQL Server tutorial on DatabaseFAQs.com in one place, grouped by what you’re trying to do. Start with installation and your first table, then work through queries, joins, stored procedures and triggers.
Stuck on an error? Jump straight to Errors and fixes.
- 175free SQL Server tutorials
- 16topics
- Oct 2026last updated
New to SQL Server? Start here
Read these in order. Each one builds on the one before it.
- How to Install SQL Server 2022 Express EditionGet a free SQL Server instance running on Windows.
- How to Install SQL Server Management Studio [SSMS]Install SSMS, the tool you'll use for every lesson.
- How to create a database in SQL Server 2019Create your first database.
- SQL Server Add Column: ALTER TABLE ADD With ExamplesShape tables as your data changes.
- SQL Server INNER JOINCombine rows from related tables.
- SQL Server Create Stored Procedure: Syntax, Parameters and ExamplesPackage your queries into reusable procedures.
The basics3
What it is, what it's good for, and the questions people ask before they commit to it.
Install, connect and tools11
Install it, connect to it, and get your tools working.
- How to check if SQL Server is running
- How To Create A New Database In Microsoft Sql Server Management Studio
- How to Create a Table in SQL Server Management Studio
- How To Get The Connection String From SQL Server
- How to Install SQL Server 2019 Express Windows 10
- How To Make Font Bigger In SQL Server Management Studio
- How To See What Version Of SQL Server Is Running
- SQL Server Port – Details Guide
- View Line Numbers in SQL Server Management Studio
- How to Install SQL Server 2022 Express Edition
- How to Install SQL Server Management Studio [SSMS]
Databases, tables and columns18
Create and change databases, tables, columns, keys, indexes and views.
- Create Foreign Key in SQL Server – Complete tutorial
- How To Alter View In SQL Server
- How to Call a View in SQL Server
- How to Create a Temp Table in SQL Server (#Temp, SELECT INTO, ##Global)
- How To Create Table From View In SQL Server
- How to Drop Table if Exists in SQL Server
- How To Find Database Name In SQL Server
- How To Get Column Description In SQL Server
- How To Get Table Row Count In SQL Server
- How to see view definition in SQL Server
- How to use union in view SQL Server
- How to view table in SQL Server
- Indexed views in SQL Server
- Pass parameters to view in SQL Server
- SQL Server view order by
- View in SQL Server
- How to create a database in SQL Server 2019
- SQL Server Add Column: ALTER TABLE ADD With Examples
Data types6
Pick the right data type for every column.
SELECT queries, filtering and grouping7
Read data with SELECT, filter it, sort it and summarize it.
Joins22
Combine rows from two or more tables.
- Delete From With Join in SQL Server
- How To Update Table Using JOIN in SQL Server
- How to use Distinct in JOIN in SQL Server
- How to Use EQUI JOIN in SQL Server
- RIGHT JOIN in SQL Server
- SQL Server Count Join Group By
- SQL Server FULL OUTER JOIN with WHERE clause
- SQL Server Group by Join Strings
- SQL Server Inner Join Multiple Tables
- SQL Server Inner Join Top 1
- SQL Server Inner Join with Like
- SQL Server Inner Join With Where Clause
- SQL Server Join With Max Date
- SQL Server LEFT JOIN Tutorial
- SQL Server Left Join With Count + Examples
- SQL Server Left Outer Join Multiple Tables
- SQL Server LEFT OUTER JOIN with WHERE clause
- SQL Server OUTER JOIN + Examples
- SQL Server Row_Number Join
- What is SELF JOIN in SQL Server?
- What is SQL Server Cross Join?
- SQL Server INNER JOIN
Insert, update and delete4
Add, change and remove rows safely.
Strings, numbers and conversions4
Work with text and numbers, and convert between types.
Dates and times7
Format, compare and calculate dates and times.
Functions7
Built-in functions and the ones you write yourself.
Stored procedures, variables and control flow26
Stored procedures, variables, IF/CASE logic, loops, error handling and transactions.
- ALTER Stored Procedure in SQL Server
- Drop stored procedure SQL Server
- Exception Handling in SQL Server
- How To Check Stored Procedure Execution History In SQL Server
- How to Create Advanced Stored Procedures in SQL Server
- How to Execute a Stored Procedure in SQL Server (EXEC With Parameters)
- How to Find Stored Procedure in SQL Server
- How to find who created a stored procedure in SQL Server
- How To Save Stored Procedure In SQL Server
- How to test stored procedure in SQL Server
- How to Use If Else in SQL Server Stored Procedure
- How to view stored procedure in SQL Server
- Loop in SQL Server stored procedure (with examples)
- Rename stored procedure in SQL Server
- SQL Server Find Text in Stored Procedure (By Text, Name or Table)
- SQL Server select from stored procedure (9 Examples)
- SQL Server stored procedure case statement
- SQL Server stored procedure if exists update else insert
- SQL Server Stored Procedure Naming Convention and Best Practices
- SQL Server Stored Procedure Output Parameter
- SQL Server Stored Procedure Parameters: Optional, Default, OUTPUT and Table-Valued
- SQL Server stored procedure return value
- Stored procedure for search functionality in SQL Server
- Temp table in stored procedure in SQL Server
- Try catch in SQL Server stored procedure with examples
- SQL Server Create Stored Procedure: Syntax, Parameters and Examples
Triggers20
Run code automatically when rows are inserted, updated or deleted.
- Disable Trigger in SQL Server
- How To Debug A Trigger In SQL Server
- How to execute Trigger in SQL Server
- How to get inserted value in trigger SQL Server
- How to get trigger definition in SQL Server
- If Else In Trigger SQL Server
- Instead of Trigger In SQL Server
- Recursive Trigger in SQL Server
- SQL Server Create Trigger If Not Exists
- SQL Server Drop Trigger If Exists
- SQL Server Trigger After Insert (and After Insert, Update)
- SQL Server Trigger Before Insert (and Before Update): Use INSTEAD OF
- SQL Server Trigger For Update with Examples
- SQL Server Trigger on Delete Insert Into Another Table
- SQL Server Trigger On View
- SQL Server Trigger to check if value has changed
- SQL Server trigger tutorial with examples
- SQL Server Update Trigger Only If Column is Modified
- Trigger For Delete in SQL Server
- Trigger to insert data in another table in SQL Server
Users, logins and permissions3
Create users, reset passwords and grant the right permissions.
Backup, import/export and administration14
Back up, restore, import, export, migrate and monitor.
- How To Backup A Table In SQL Server
- How To Check Database Encryption In SQL Server
- How To Check DB Size In SQL Server
- How To Enable Filestream In SQL Server
- How To Enable Query Store In SQL Server
- How to Export Data from SQL Server to Excel
- How To View Database Diagram In SQL Server
- How to View SQL Server Error Logs
- SQL Server Agent not Starting
- SQL Server bulk insert from CSV file
- SQL Server move database files
- SQL Server scheduled stored procedure