SQL Server & T-SQL Fundamentals
Learn Microsoft SQL Server, the database behind many banks, SACCOs, insurance companies, hospitals and ERP systems in Kenya. Write T-SQL queries and reports, program stored procedures, handle errors and transactions, tune performance, secure and back up databases, and connect SQL Server to Excel and Power BI.
4
units
20
lessons
83
practice questions
~300
minutes
Start learning today
Create a free account, then unlock this and every other Pro course with Learnix Pro for KES 999/month.
Create free account I already have an accountOutcomes
What you'll be able to do
Install SQL Server Developer edition and use SSMS
Create tables and write T-SQL queries
Build reports with joins, grouping, CTEs, window functions and PIVOT
Write variables, stored procedures, functions, views and triggers
Use transactions and TRY...CATCH safely
Tune queries with indexes and execution plans
Secure, back up and schedule jobs, and connect Power BI
How it works
Read it, see it, practise it
Each lesson explains one topic clearly, shows worked examples, checks your understanding with quick questions and ends with a practical task you complete yourself.
Clear explanations
Step-by-step lessons in plain language
21 in this course
Worked examples
Real code and examples you can copy and run
20 in this course
Quick checks
Test your understanding as you go
60 in this course
Fill the blank
Recall the key commands and syntax
20 in this course
Hands-on workspace
A practical task at the end of every lesson
20 in this course
Syllabus
Everything you'll encounter
Why SQL Server?
Where SQL Server is used, its editions, and how T-SQL relates to standard SQL.
Installing SQL Server & SSMS
Install SQL Server Developer edition and SQL Server Management Studio, connect, and create your first database.
Tables, Data Types & Schemas
Choose SQL Server data types (nvarchar, decimal, datetime2, bit, uniqueidentifier), use IDENTITY and organise tables into schemas.
Insert, Update, Delete, TOP & OUTPUT
T-SQL data changes, returning affected rows with OUTPUT, and paging with OFFSET/FETCH.
Filtering & Built-in Functions
WHERE filters plus T-SQL string, date and conversion functions: CONCAT, FORMAT, DATEDIFF, DATEADD, EOMONTH, TRY_CONVERT.
Joins, Including Self-Joins
INNER, LEFT and self-joins: employees with departments, managers and payslips.
Grouping & Summary Reports
GROUP BY, HAVING, ROLLUP for subtotals, and STRING_AGG for lists.
CTEs, Subqueries & Recursive Org Charts
Write readable step-by-step queries with WITH, correlated subqueries, and recursive CTEs for hierarchies.
Window Functions for Reports
Rank staff, compute running totals and month-on-month changes with ROW_NUMBER, RANK, SUM OVER and LAG.
CASE & PIVOT: Reshaping Data for Reports
Label rows with CASE, build conditional totals, and turn rows into columns with PIVOT (and conditional aggregation).
Variables, IF and WHILE
Write T-SQL scripts with variables, conditions, loops and temporary tables.
Stored Procedures
Package business operations as parameterised stored procedures that apps and jobs can call safely.
User-Defined Functions & Views
Reuse calculations with scalar and table-valued functions, and simplify reporting with views.
Triggers & Audit Trails
Record who changed what and when with AFTER triggers and the inserted/deleted tables, or with temporal tables.
Transactions & TRY…CATCH
Make multi-step changes all-or-nothing and handle errors properly with XACT_ABORT, TRY…CATCH and THROW.
Indexes & Execution Plans
Clustered vs non-clustered indexes, covering indexes with INCLUDE, and reading execution plans in SSMS.
Logins, Users, Roles & Permissions
Control access with logins and database users, roles, schema permissions and EXEC-only access to procedures.
Backups, Restores & SQL Agent Jobs
Full, differential and log backups, recovery models, restoring safely, and scheduling jobs with SQL Server Agent.
Connecting Excel & Power BI to SQL Server
Pull live SQL Server data into Excel and Power BI, use views as clean sources, and refresh reports automatically.
Project: A SACCO Loans Database
Design and implement a SACCO members, savings and loans database in SQL Server with procedures, audit and reports.
Finish the course, earn a verifiable certificate
Complete every lesson, then pass the 20-question final exam (70% to pass, unlimited retakes), to receive a Learnix certificate with a unique number anyone can verify online.