
This is the introduction to the course. We will talk about how this course is structured and what will you learn by attending the course.
In this lecture, we will talk about Python on Windows, its requirements and the available installation options.
In this lecture, we will talk about some of the Integrated Development Environments (IDEs) that support Python development.
In this lecture, we will talk about the demo environment that will be used for the course’s examples and live demonstrations.
This lecture, is a recap of what you have learned in this introductory section.
This lecture, is an overview of what you will learn in this section.
In this lecture and live demonstration, we will talk about and install Python on our demo Windows environment.
In this lecture and live demonstration, we will install Visual Studio Code on Windows, along with installing the Python extension.
In this lecture and live demonstration, you will learn how to write, compile and run your first Python program in Visual Studio Code.
In the lecture and live demonstration, we will refresh our memory on the basic Python commands and data structures.
This lecture, is a recap of what you have learned in this section.
This lecture, is an overview of what you will learn in this section.
In this lecture and live demonstration, we will talk about the pyodbc module and we will also install it on our demo environment.
In this lecture, we will talk about the different ways and options, for setting up a connection string for SQL Server data access, in your Python programs using pyodbc and the ODBC Driver for SQL Server.
In this lecture and live demonstration, you will learn about the procedure for connecting to SQL Server via a Python Program.
In this lecture and live demonstration, we will talk about exception handling and learn how to apply exception handling capabilities to your SQL Server data access code in Python.
In this lecture and live demonstration, we will run our first SQL Server T-SQL query from within our Python program, and display the query results.
Learn about common pitfalls you may encounter when working with SQL Server from Python and more importantly, how to avoid them.
This lecture, is a recap of what you have learned in this section.
This lecture, is an overview of what you will learn in this section.
In this lecture and live demonstration, you will learn how to execute SQL Server SELECT T-SQL statements from within your Python programs. Moreover, you will learn how to use parameters for this type of queries.
In this lecture and live demonstration, you will learn how to execute SQL Server INSERT T-SQL statements from within your Python programs. Moreover, you will learn how to use parameters for this type of queries.
In this lecture and live demonstration, you will learn how to execute SQL Server UPDATE T-SQL statements from within your Python programs. Moreover, you will learn how to use parameters for this type of queries.
In this lecture and live demonstration, you will learn how to execute SQL Server DELETE T-SQL statements from within your Python programs. Moreover, you will learn how to use parameters for this type of queries.
In this lecture and live demonstration, you will learn how to run other SQL Server T-SQL statements from within your Python programs, such as aggregations and DMVs, along with calling SQL Server system global variables.
This lecture, is a recap of what you have learned in this section.
This lecture, is an overview of what you will learn in this section.
In this lecture and live demonstration, you will learn how to create SQL Server Stored Procedures from within your Python Programs.
In this lecture and live demonstration, you will learn how to execute SQL Server Stored Procedures from within your Python Programs and get the results.
In this lecture and live demonstration, you will learn how to execute SQL Server Stored Procedures from within your Python Programs that do not return a result.
This lecture, is a recap of what you have learned in this section.
This lecture, is an overview of what you will learn in this section.
Let’s Create a SQL Server Function from within a Python Program
In this lecture and live demonstration, you will learn how to execute SQL Server Functions from within your Python Programs and get the results.
In this lecture and live demonstration, you will learn how to call SQL Server System Functions from within your Python Programs and get the results.
This lecture, is a recap of what you have learned in this section.
This lecture, is an overview of what you will be learning in this section.
In this lecture and live demonstration, you will learn how to import data from a CSV file, directly to SQL Server via your Python program.
In this lecture and live demonstration, you will learn how you can convert your Python scripts, to Windows executables.
In this lecture and live demonstration, you will learn how to create a basic GUI dialog in Python using the tkinter interface, and how to connect your GUI program to SQL Server and retrieve data.
In this lecture, we will see step by step, how we can run the SQL Server BULK INSERT command from within a Python Program.
In this advanced topic, via a live demonstration, we see step by step, how we can run multiple .sql scripts from a folder, on SQL Server using PowerShell calls via our Python code.
In this lecture, we'll be discussing about some helpful best practices that can improve your learning process and help you become more skilled at combining Python with SQL Server for your data-driven applications.
In this lecture, I’ll walk you through a demo implementation of how to use LangChain to connect to the Microsoft Learn Docs MCP server, discover available tools, and invoke a semantic documentation search.
In this lecture, we'll explore Privileged Access Management, or PAM, in SQL Server. Privileged accounts, like sysadmin logins, are powerful but also pose the highest security risks if they’re misused or compromised. We'll look at common challenges, best practices to minimize and control privileged access, how to implement Just-in-Time access, and why auditing is essential.
In this lecture, we discuss safe Retries for Python Data Imports. We will use a concrete example to understand the decision, work through the reasoning, and finish with a short knowledge check.
This lecture, is an overview of what you will be learning in this section.
Via this lecture, you will learn more about the best practices for when installing SQL Server.
In this session, I’ll be providing a conceptual overview of the main data types in SQL Server and discuss how they map to Python types. Even though, these mappings are automatically handled by relevant Python database libraries, this understanding is essential for writing effective Python applications that interact with SQL Server databases.
In this lecture, we will be discussing about the benefits of primary keys in database tables.
In this lecture, we will be discussing about the benefits of using stored procedures in databases.
In this lecture, you will learn many useful T-SQL tips and tricks that will help you with SQL Server development.
Via this lecture and live demonstration, you will learn how to easily retrieve version information about your SQL Server instances.
Via this lecture and live demonstration, you will learn all about T-SQL snippets in SSMS.
In this lecture, we will be discussing about the different Operating Systems supported by SQL Server.
In this lecture and live demo, we will talk about SQL Server Express Edition, its characteristics and limitations, and how you can download it and install it on a new Windows environment, along with installing the latest version of SQL Server Management Studio (SSMS).
In this lecture, we’ll review the fundamentals of clustered and non-clustered indexes, then explore specialized types like columnstore, filtered, and full-text indexes.
In this lecture, we'll be discussing about SQL Server authentication modes, that is the available ways of getting authenticated when accessing SQL Server.
This lecture, is an overview of what you will be learning in this section.
In this lecture, we will be discussing about SQL Server Machine Learning Services, as this feature allows you to run Python (and R) scripts in SQL Server in-database.
In this lecture and demo, we will be installing SQL Server Machine Learning Services, as part of performing a new installation of SQL Server.
In this lecture, we will be discussing about the Python and R Packages included in SQL Server Machine Learning Services.
In this lecture and live demonstration, you will learn how to execute Python scripts directly in SQL Server, via SQL Server Machine Learning Services.
In this lecture, we'll explore how Exploratory Data Analysis (EDA) can help you uncover valuable insights in your data using Python's powerful libraries.
In this lecture, we'll be discussing about the different layers of Artificial Intelligence, their main characteristics, and why is important to identify them.
In this lecture, we’ll trace the evolution of Collaborative Intelligence — from static, rule-based tools to dynamic, self-improving human–AI ecosystems.
This lecture helps you understand where logic should be executed in a system. The goal is not to favor a tool, but to make correct architectural decisions that improve performance, simplicity, and reliability.
In this lecture, we discuss about how data moves within systems and how to choose the right pattern. The goal is to avoid unnecessary complexity while meeting business requirements.
Learn how to connect Python applications to Microsoft SQL Server and perform practical database operations directly from your code.
This focused course shows you how Python and SQL Server can work together in real database-development scenarios.
You will learn how to establish database connections, execute SQL statements, work with parameters, handle errors, call stored procedures and functions, import data, and interact with SQL Server system information using Python.
If you already understand the basics of Python and SQL Server and want to bring the two technologies together, this course gives you a practical path forward.
Connect Python to SQL Server
The course begins by preparing the Windows development environment and reviewing the Python concepts needed for the database examples.
You will then learn how to connect Python to SQL Server using pyodbc and understand the main components involved in establishing and managing a database connection.
From there, you will move into the database operations that appear frequently in applications, scripts, automation tasks, and data-processing workflows.
Topics include:
Connecting Python to SQL Server with pyodbc.
Executing SQL statements from Python.
Retrieving data with SELECT queries.
Inserting new records.
Updating existing data.
Deleting records.
Working with parameters.
Handling database exceptions.
Executing stored procedures.
Working with SQL Server functions.
Retrieving SQL Server system information.
Importing CSV data into SQL Server.
Perform CRUD Operations with Python
One of the most useful skills when integrating Python with a relational database is understanding how to perform the core database operations commonly known as CRUD:
Create data.
Read data.
Update data.
Delete data.
You will see how Python code can execute these SQL Server operations and process the results returned by the database.
The examples help you understand the complete flow from Python code to SQL Server and back again.
Write Safer and More Reliable Database Code
Database access involves more than simply sending SQL statements.
You will also explore important development concepts such as parameterized queries and exception handling.
These topics help you understand how to write Python database code that is more structured, maintainable, and suitable for real applications and automation scripts.
Work with Stored Procedures and SQL Server Features
The course goes beyond basic SQL statements and shows how Python can interact with additional SQL Server functionality.
You will explore examples involving:
Stored procedures.
SQL Server functions.
Aggregate functions.
Dynamic Management Views.
SQL Server system variables.
These examples demonstrate that Python can be used not only for application data access, but also for administrative, monitoring, and data-processing scenarios.
Import Data from CSV Files
A practical CSV import example demonstrates how Python can be used as a bridge between external data and SQL Server.
This type of workflow is common in:
Data integration.
Automation.
ETL-style processing.
Reporting preparation.
Database utilities.
The example helps connect the individual Python and SQL Server concepts with a practical data-processing task.
Explore Python Inside SQL Server
The course also introduces SQL Server Machine Learning Services and the concept of executing Python code from within SQL Server.
This is different from a Python application connecting externally to SQL Server through pyodbc.
Understanding both approaches gives you a broader view of how Python can participate in SQL Server solutions and helps you distinguish between external database access and server-side Python execution.
Who Is This Course For?
This course is suitable for:
Python developers who want to work with SQL Server.
SQL Server professionals who want to start using Python.
Database developers.
Data engineers and data professionals.
Automation engineers.
Developers building database-driven Python applications.
IT professionals interested in integrating Python with Microsoft data technologies.
Basic knowledge of Python and SQL Server is recommended.
The course includes a Python refresher, but it is not intended to be a complete introduction to Python programming or relational database concepts.
About the Learning Environment
The demonstrations use a Windows-based development environment.
If you reproduce the examples, use a test SQL Server database, an appropriate ODBC driver, and permissions suitable for the operations you want to perform.
Some installation screens and software interfaces may differ in newer versions, but the core concepts behind Python-to-SQL Server connectivity and database operations remain applicable.
The SQL Server Machine Learning Services examples have additional installation and configuration requirements and are presented as a separate integration approach.
Build Practical Python and SQL Server Skills
By the end of the course, you will understand how Python applications can connect to SQL Server, execute queries and data-modification statements, work with stored procedures and SQL Server features, handle database errors, and process data programmatically.
Most importantly, you will have a practical foundation for using Python as a development, automation, and data-processing tool with SQL Server.
If you already know the basics of Python and SQL Server and want to connect the two technologies in practical scenarios, this course provides a focused place to start.