I recently put together a lesson on how to work with TSQL variables. When you create stored procedures, you can encapsulate logic

Read More
TSQL Variables in Stored Procedures

We are going to show you the difference between a stored procedure and a user defined function in SQL. This way you

Read More
User Defined Function versus Stored Procedure

I recently put together a lesson on debugging stored procedures.  When you debug stored procedures, you’re able to run their code line

Read More
Debugging Stored Procedures in SQL Server

What is a Stored Procedure? A stored procedure is a group of one or more database statements housed in the database’s data

Read More
Stored Procedures: the ultimate guide.

After reading this article you will understand the basics of using the WHILE statement to write a loop within a stored procedure.

Read More
WHILE Statement – Using in SQL Server

After reading this article you will understand what a database cursor is, see an example, and understand when to use them in

Read More
What is a Database Cursor?

After you have read this article, you will get to learn the basics of a dynamic SQL, how to build statements based

Read More
Dynamic SQL – Build using Stored Procedures

After reading this article you will understand the basics of programming a stored procedure using IF ELSE statements; most importantly how keywords,

Read More
Use IF ELSE Statements to Program a Stored Procedure

Using NULLIF to compare missing values to NULL is handy. It become especially useful when you find yourself working with a column

Read More
Using NULLIF with Missing Values

In this post we’ll look at how to use C# with SQL. In this tutorial, we will discuss the process for creating

Read More
How to use C# with SQL

The SQL @@VERSION global variable returns the version of the currently installed SQL server. It includes the SQL server’s system and the

Read More
SQL @@VERSION (Transact SQL)

Learning how to use SQL Variable in queries is a step in the right direction towards making your queries more flexible for

Read More
How to Use SQL Variables in Queries

Knowing how to optimize stored procedures is important, so stick around and I’ll show top five stored procedure performance tips you can

Read More
Top 5 Stored Procedure Performance Tips You Can Use

In this video we’ll walk you though how to use comments within a query. We’ll go over block as well as inline

Read More
Use SQL Comments to Code Like a Boss

Use the SQL BIT data type to define columns, variables, and parameters value of 1, 0, or NULL.  Given their Yes/No nature, designer us the BIT

Read More
SQL BIT Data Type

A reader recently asked about a error converting data type error they received.  Since this is a common issue, especially when numeric

Read More
How do I handle a “Error converting data type” error?

We are going to learn how to create a bar chart using SQL server in this puzzle. It can sometimes be fun

Read More
How to Create A Bar Chart Using SQL Server

In this article, we will be exploring the CAST and CONVERT functions to understand whether there are any significant differences worth knowing

Read More
Know When to Use Cast versus Convert

Sort Alphanumeric Values with SQL Server Recently a reader asked me how to sort an alpha numeric field in SQL in natural

Read More
Use SQL Server to Sort Alphanumeric Values