This Transact-SQL course takes you beyond querying and into real programming with SQL Server. You’ll learn how to write stored procedures, use variables, handle errors and build functions with ease.
The Programming Microsoft SQL Server with Transact-SQL teaches you to write T-SQL code in SQL Server. You’ll work with variables, loops, error handling, stored procedures, triggers and dynamic SQL. Boost your knowledge of practical programming skills, gaining the ability to automate tasks, manage data and enhance your day-to-day development work.
Enhance data manipulation and automation with T-SQL programming. Our expert instructors will teach you how to structure SQL programmes, use procedural logic, and handle everything from cursors to error trapping. All through practical exercises in our live labs.
Learn how procedural code is structured in Transact-SQL and build confidence in writing efficient, well-organised scripts. Explore how statement blocks work, learn how to control the flow of execution using conditional logic and loops, and understand how to document your code effectively with clear comments. These core concepts provide the foundations for more advanced techniques and prepare you to write code that is both readable and reliable.
Develop the skills to master how your code behaves in different scenarios using conditional logic and loop structures. You’ll learn how to use IF/ELSE statements to direct the flow of your scripts, implement WHILE loops for repetitive tasks, and apply control commands like BREAK, CONTINUE, and WAITFOR to fine-tune execution. These tools help you write more responsive and adaptable SQL programs that handle logic with precision.
Build stored procedures that make your code more modular, reusable and secure. You’ll gain hands-on experience creating procedures with parameters, controlling what they return, and managing output for different use cases. Also, explore how to work with result sets and structure procedures to support performance and maintainability, an essential skill for professional database development.
Discover how to write your own functions in T-SQL to streamline code and support reusability. Learn how to develop both scalar functions, which return single values, and table-valued functions, that return result sets. These techniques help you write cleaner, more maintainable code while reducing duplication and improving clarity in your database operations.
Developers and DBAs who want to go beyond querying and build effective SQL programmes in Microsoft SQL Server.
You should have some SQL knowledge and be confident writing queries. Prior coding experience will also be helpful, but is not essential
Our experienced trainers and interactive labs create a focused, practical environment – so you can put theory into practice from day one.
This two-day course shows you how to use Transact-SQL for real-world programming in SQL Server. Learn variables, logic, procedures, triggers and more, in our live virtual classrooms.
Variables in T-SQL allow you to store and manipulate data within your scripts, enabling dynamic programming and better control over logic. You can use them to hold values, calculate results, and pass data between statements. On this course, you’ll learn how to declare and initialise variables, set and retrieve their values, and apply them in queries and updates.
IF statements and loops control the flow of execution in your T-SQL scripts. IF...ELSE lets you run different code blocks depending on conditions, and WHILE loops repeat operations until a specified condition is met. You’ll also use commands like BREAK and CONTINUE to fine-tune flow. This course teaches you how to apply these control structures effectively, helping you write code that reacts to different scenarios and handles complex logic with ease.
User-defined functions (UDFs) allow you to encapsulate logic into reusable components that return values, either as a single result (scalar) or as a table. They are ideal for simplifying queries and reducing repetition in your code. Our trainers will teach you how to create, test and use both scalar and table-valued functions in SQL Server, so you can write cleaner, more maintainable T-SQL scripts.
Once you’ve completed this course, you can build on your skills with the Advanced Querying Microsoft SQL Server with Transact-SQL course. It covers more complex querying techniques, performance tuning, and advanced use of joins, indexes and subqueries. The course is perfect for those learners looking to take their SQL expertise to the next level.
“This is now my second course with John at StayAhead and once again the delivery was simply excellent. Best fun I've had at work for a while now. I would highly recommend the course to anyone who's taking on more PL/SQL work in their job. Hoping to come back for more in the future!”
“Always good courses from StayAhead. Tutor explained the course very well.”
We combine experience and passion to deliver training that meets the highest standards
Industry-leading specialists delivering high-impact IT training
Courses are delivered by experienced instructors using hands-on, practical live labs
Please complete the form to ensure your quote is accurate and we will contact you soon.