FB

SQL Server

SQL Server is Microsoft’s SQL database product. It’s popular in medium and large companies and is the main alternative to Oracle database. It offers a free Express version as well as a licensed version.

Learning the Basics

59 Best Resources for Learning SQL: A large list of other places to learn SQL

19 Best Database Books: a list of books on database-related topics

SQL Roadmap: a guide on SQL topics from beginner to advanced.

How to Set Up an SQL Server Database on Docker: This tutorial describes how to set up an SQL Server database using Docker.

How to Install SQL Server Express (& SSMS): a guide with step-by-step instructions on how to install SQL Server Express and SSMS on a Windows computer

Basic SQL Statements

Data Manipulation

SELECT Statement Guide: view data in a table

INSERT Statement Guide: add data to a table

UPDATE Statement Guide: modify data in a table

DELETE Statement Guide: remove data from a table

Clauses

WHERE Clause: filter data from your query

ORDER BY Clause: specify the order of the results of a Select query

GROUP BY: allows you to group data by values in a column and use aggregate functions

HAVING Clause: allows you to filter data after a group has been applied

DISTINCT: eliminate duplicate rows from your results

Tables

Create Table guide: create a new table on the database

Alter Table guide: make changes to an existing table

Drop Table guide: remove a table from the database

Truncate Table guide: remove all data from a table

Additional SQL Features

Operators: perform calculations and operations on data

Set Operators: combine results from two queries into one

CASE Statement: use conditional (if then else) logic in a query

PIVOT and UNPIVOT: how to translate rows and columns

 

Joins

Joins guide: a guide to joins which are how you combine multiple tables together in a query

One to One joins (video): definition of this join type and an example

One to Many joins (video): definition of this join type and an example

Many to Many joins (video): definition of this join type and an example

Self Join (video): definition of this join type and an example

 

Functions

Aggregate Functions: functions that aggregate data into one or more rows

Window Functions: functions that let you analyse data across multiple rows

CONVERT: A guide to the CONVERT function in SQL Server

DATEDIFF: A guide to the DATEDIFF function in SQL Server

 

Objects

There are many more objects in a database besides tables. Learn all about them in these guides.

Indexes: a guide to Indexes in SQL

Constraints: rules that can be set on your data

Keys: surrogate, natural, primary, foreign, composite, and more

Stored Procedures: a guide to stored procedures in SQL

Views and Materialised Views: objects that let you view data in certain ways

Database Schema: an explanation of this term

Temporary Tables: what it is and how to create one

 

Further Learning

More features and topics in SQL and SQL Server database.

Glossary of Terms: A definition of many terms used in SQL and database development

Data Types: a guide to data types in many different databases

Interview Questions and Answers: a list of 69 interview questions and answers, plus interview tips

DML, DDL, and TCL: a list of SQL commands and what DDL, DML, and TCL mean

Aliases: A guide to column aliases and table aliases in SQL

Subqueries: a guide to subqueries, what they are, and many different examples.

Limiting Results: a guide to SQL row limiting and Top-N queries

CTE (WITH Clause): a guide to Common Table Expressions (CTEs) aka the WITH clause

Transactions and Isolation Levels: an explanation of transactions in SQL and what isolation levels are

Concatenate: what concatenation is and how to do it in SQL

Booleans: how SQL handles booleans and how you can implement them

Wildcards: An explanation of what wildcards are and how to use them

Null: a guide on what NULL is and how to handle them in SQL

Data Warehouses: an in-depth guide to data warehouses

Comments: a guide to comments in SQL and why they can help

Database Version Control, CI, and CD: An in-depth guide on database version control, continuous integration, and continuous deployment

How To

A collection of articles detailing how to do common tasks in SQL queries.

Select Rows with a Max Value: how to select rows with a maximum value for a column

List Tables in a Database: how to list all the tables in a database or a schema

Escape Single Quotes: how to escape single quotes in SQL

Remove Duplicate Records: how to remove duplicate records in SQL

Database Timezones: The Ultimate Guide: how to store and work with dates, times, and timezones in a database

References

Here’s a compilation of reference lists that can be useful when working with SQL Server.

42 ETL Tools: a list of 42 different ETL tools.

51 SQL IDEs and Editors: a list of many different SQL editors to let you write SQL code and much more.

Table of Contents