Iterating Over SQL Server Certificates with Cursors Welcome to another SQL Server educational post! Today, we’re going to explore how to use cursors to iterate over all certificates in the sys.certificates system view. Cursors can be handy when you need to process each row in a result set individually. A T-SQL (Transact-SQL) cursor is a database object used in SQL …

Iterating Over SQL Server Certificates with Cursors Read more »

A cursor is a tool in SQL Server that allows a user to traverse through the rows of a result set one row at a time. This can be useful for performing operations on each row of the result set individually, such as updating or deleting specific rows. Cursors are created using the DECLARE CURSOR statement, and are associated with …

Simple Introduction to TSQL Cursors Read more »

Here is the outline: Using Cursors Using String Functions Here is the link to the Google On Air Broadcast where you can watch for free. https://plus.google.com/events/ci8jms67qttuteegimrf4sj70sk After the presentation, I will update this page with a link to the YouTube video. This session will be about 90 minutes, Aaron Buma will present about half and I will present the other …

Today’s Live Training: Using Cursors and TSQL String Functions Read more »

First lets take a look at two queries using CURSORS, the first one will use the FORWARD_ONLY type cursor, and the second will use the FAST_FORWARD type cursor. These two types sound very similar, but perform quite differently. Now for the FAST_FORWARD CURSOR example. Notice only one line has changed, that’s the line that says “SET @PeoplePhoneCursor = CURSOR FAST_FORWARD …

Simple Cursor Example : FORWARD_ONLY vs FAST FORWARD Read more »

In SQL Server the cursor is a tool that is used to iterate over a result set, or to loop through each row of a result set one row at a time. It may not be the best way to work with a set of data, but if you need to loop row by agonizing row (RBAR) in a T-SQL …

T-SQL: A Listing Databases Example Using a Cursor Read more »

On Thursday March 12th at 9:00am (pacific time), we will be hosting another free training provided by Aaron Buma and I to prepare developers for the Microsoft 70-461 SQL Queries exam. This week we will be a two part session Using Cursors, followed by Using String Functions. This is provided free of charge to give back to the SQL community. Here is …

Using Cursors, followed by Using String Functions Read more »

Next week as part of the free SQL Query training that Aaron Buma and I provide, the topic I will be presenting is cursors. How to use them, what they are, everything you ever wanted to know. My concern in this presentation is that cursors have caused me many headaches in regard to performance over time. The main problem that …

SQL Server Cursors Good or Bad Read more »

For more information on cursors, also take a look at the free SQL query training provided by Steve Stedman. Cursors are a feature of SQL Server that allow users to iterate through a result set one row at a time. This can be useful in situations where a user needs to perform a set of operations on each row of a …

T-SQL: A Simple Example Using a Cursor Read more »

Understanding SQL Server Wait Types that Cause More Blocking In SQL Server, wait types can tell you a lot about what’s slowing down your system, but some wait types can actually contribute to or even cause blocking. Blocking occurs when one process holds a lock on a resource that another process needs, and that second process must wait until the …

SQL Server Wait Types that Cause More Blocking Read more »

Learn how a worktable table applies in the realm of SQL Server, efficient query processing and resource management are crucial for maintaining performance and reliability. One of the often-overlooked components that play a vital role in query execution is the worktable. In this blog post, we’ll delve into what worktables are, how they function, and why they are important for …

What is a Worktable in SQL Server Read more »