SQL Stuff Function
The main idea around the SQL Server function called STUFF is concatenating multiple columns into a...
Simple SQL Server Functions to Solve Real-World Problems
Introduction Today’s article comes from a scenario we experienced in practice some time ago. We managed a card transaction system...
Understanding of SQL Server UPPER Function
There are many cases of SQL lowercase that we need to change for our purposes. For instance, we have keywords or strings of characters in...
SQL AVG Function: A Complete Guide
In mathematics, the Average value represents the middle value that we calculate by dividing the sum...
SQL Server TRIM, LTRIM, and RTRIM Functions
The TRIM function of SQL Server is designed to remove leading and trailing whitespaces from a character string. A leading space is...
4 Ways to Count Rows in SQL Server Table with Pros and Cons
Recently, I was working on a database performance improvement project. One stored procedure there was causing issues. In its code, a query...
How to Avoid Inserting Duplicate Records in SQL INSERT Query (5 Easy Ways)
You probably know how to insert records into a table using single or multiple VALUES clauses. You...
MIN and MAX Aggregate Functions in SQL Server
SQL Server Functions In database systems in general and in SQL Server in particular, functions are pieces of code that take zero or one...
22 Different T-SQL Indexes Examples to Warp Speed Your Queries
Indexing the database tables is one of the ways to up your game in tuning queries. How do you do it? Today’s post will give you 22 SQL...
Do You Make These Mistakes When Using SQL CURSOR?
For some people, it’s the wrong question. SQL CURSOR IS the mistake. The devil is in...