Master SQL Server From Scratch

Clear, interactive, and structured SQL Server lessons designed for beginners and developers.

COURSE SYLLABUS
1. Introduction to SQL Server
Introduction to SQL Server SQL Server Installation SQL Server Fundamentals
2. Data Types
Data Types Numeric Data Types Character & String Data Types Date & Time Data Types Other SQL Server Data Types
3. Database & Tables
Database & Tables Introduction Creating a Database Creating Tables Table Structure Altering Tables Dropping Tables
4. Constraints
Constraints Introduction PRIMARY KEY FOREIGN KEY UNIQUE Constraint NOT NULL & DEFAULT CHECK Constraint
5. SQL Basics
SQL Basics Introduction SQL Commands SQL Command Categories SELECT Statement INSERT, UPDATE & DELETE
6. CRUD Operations
CRUD Operations Introduction INSERT Operation SELECT Operation UPDATE Operation DELETE Operation
7. SQL Queries
Queries Introduction WHERE Clause ORDER BY Clause DISTINCT LIKE Operator IN, BETWEEN & IS NULL
8. Joins
Joins Introduction INNER JOIN LEFT JOIN RIGHT JOIN FULL OUTER JOIN CROSS JOIN
9. SQL Functions
SQL Functions Introduction String Functions Numeric Functions Date & Time Functions Conversion Functions NULL Functions
10. Grouping & Aggregate Functions
GROUP BY Aggregate Functions COUNT() SUM() AVG() MIN() & MAX()
11. Subqueries
Subqueries Introduction Single-Row Subquery Multiple-Row Subquery Correlated Subquery Subquery with DML
12. Views
SQL Views Introduction Creating a View Updating a View Altering a View Dropping a View
13. Stored Procedures
Stored Procedures Introduction Creating a Stored Procedure Input Parameters Output Parameters Executing & Modifying Stored Procedures
14. Triggers
Triggers Introduction AFTER INSERT Trigger AFTER UPDATE Trigger AFTER DELETE Trigger INSTEAD OF Trigger
15. Transactions
Transactions Introduction COMMIT ROLLBACK SAVEPOINT Transaction with TRY...CATCH
16. Indexes
Indexes Introduction Clustered Index Non-Clustered Index Creating & Dropping Indexes Index Performance
17. Common Table Expressions
CTE Introduction Simple CTE CTE with JOIN CTE with Aggregate Functions Recursive CTE
18. Window Functions
Window Functions Introduction ROW_NUMBER() RANK() and DENSE_RANK() LEAD() and LAG() PARTITION BY
19. Advanced SQL
Advanced SQL Introduction Temporary Tables Table Variables Dynamic SQL Error Handling Performance Optimization

SQL Server Installation

SQL Server can be installed on Windows by following a few simple steps. In this section, we will learn how to download, install and configure SQL Server for development.

What is SQL Server Installation?

SQL Server installation is the process of setting up Microsoft SQL Server on a computer so that applications and users can store, manage and retrieve data using SQL queries.

During installation, SQL Server components, database services and required features are configured on the system.

System Requirements

Before installing SQL Server, make sure your system meets the basic requirements required for installation.

  • Windows operating system
  • Sufficient RAM and disk space
  • Administrator access
  • Stable internet connection for downloading the installer

Download SQL Server

SQL Server is available in different editions. For learning and development purposes, the Developer edition is commonly used because it provides the features required for development and testing.

Recommended for Learning

SQL Server Developer Edition can be used for learning, development and testing purposes.

SQL Server Installation Steps

Follow these steps to install SQL Server on a Windows system.

  1. Download the SQL Server installer.
  2. Run the installer with administrator permissions.
  3. Select the appropriate SQL Server edition.
  4. Accept the license terms.
  5. Select the required SQL Server features.
  6. Configure the SQL Server instance.
  7. Configure authentication mode.
  8. Complete the installation.

SQL Server Installation Flow

The complete installation process can be understood using the following flow:

Download SQL Server
↓
Run Installer
↓
Select Edition
↓
Accept License Terms
↓
Select Features
↓
Configure SQL Server Instance
↓
Configure Authentication
↓
Complete Installation

Installation Flow Explained

Step Explanation
Download SQL Server Download the SQL Server installer required for your development environment.
Run Installer Start the installer with administrator permissions.
Select Edition Select the SQL Server edition required for your development or learning environment.
Accept License Terms Review and accept the SQL Server license agreement.
Select Features Select the SQL Server components and features required for the installation.
Configure Instance Configure the SQL Server instance that will run on the computer.
Configure Authentication Select the authentication method that will be used to connect to SQL Server.
Complete Installation Finish the setup and verify that SQL Server is ready to accept connections.

SQL Server Instance

A SQL Server instance represents an installation of the SQL Server database engine running on a computer.

During installation, the SQL Server instance is configured so that applications and database tools can connect to it.

Important

The instance configuration is an important part of SQL Server installation because applications use the configured instance to connect to the database engine.

Install SQL Server Management Studio (SSMS)

SQL Server Management Studio, commonly called SSMS, is a graphical tool used to connect to SQL Server and work with databases, tables, queries and other database objects.

Why do we need SSMS?
  • Create and manage databases
  • Write and execute SQL queries
  • Create tables and database objects
  • Manage SQL Server connections

Authentication Modes

During SQL Server configuration, authentication determines how users connect to the SQL Server instance.

Authentication Mode Description
Windows Authentication Uses the Windows user account to authenticate with SQL Server.
SQL Server Authentication Uses a SQL Server login and password for authentication.

Verify SQL Server Installation

After installation, open SQL Server Management Studio and connect to the SQL Server instance.

If the connection is successful, SQL Server is ready to create databases and execute SQL queries.

SQL
SELECT @VERSION;

The above query can be used to display information about the SQL Server version currently connected to.

Summary

In this section, we learned the basic SQL Server installation process, system requirements, SQL Server editions, installation steps, SQL Server instances, authentication modes and the role of SQL Server Management Studio.