In this SQL cheat sheet, we’ll look at sample SQL queries that can help you learn basic T-SQL queries as quickly as possible.
Read more »SQL commands
How to use the CROSSTAB function in PostgreSQL
February 17, 2023This article will explore the use of the CROSSTAB function in PostgreSQL.
Read more »Learn the PostgreSQL COALESCE command
January 19, 2023This article will make you learn the Postgres Coalesce command with examples.
Read more »Learn SQL standard deviation function
January 17, 2023This article will show the SQL standard deviation function with several examples.
Read more »An overview of the SQL GROUP BY clause
December 28, 2022This article briefly explains the SQL group by clause, when it should be used, and what we should consider when using it.
Read more »Use of the RESTORE FILELISTONLY command in SQL Server
December 21, 2022This article explores the RESTORE FILELISTONLY command in SQL Server with examples.
Introduction
Performing a database backup is an integral part of a DBA’s job. Backups are taken to ensure that data can be recovered in an emergency. There are different restore mechanisms, and the SQL Server DBA needs to understand them to make the right decision in each situation.
Read more »The difference between WHERE and HAVING clause in SQL
December 16, 2022This article aims to explain the WHERE, GROUP By, and HAVING clauses in detail. Also, we will see the difference between WHERE and HAVING with examples.
Read more »How to add or subtract dates in SQL Server
December 15, 2022This article explores SQL Server functions to add or subtract dates in SQL Server.
Read more »Why do we need Correlated Subqueries in SQL
December 9, 2022This article speaks about correlated subquery and why we need it when querying a SQL database.
Additionally, we are going to understand the difference between simple subqueries and correlated subqueries with the help of some easily understandable examples.
Read more »Different SQL TimeStamp functions in SQL Server
November 25, 2022This article will show different SQL timestamp functions available with examples.
Read more »xp_cmdshell and sp_xp_cmdshell_proxy_account stored procedures in SQL Server
June 22, 2022This article explains the xp_cmdshell and sp_xp_cmdshell_proxy_account system stored procedures in SQL Server and how developers can use them to execute Windows commands.
Read more »Lever the TSQL MAX/MIN/IIF functions for Pinpoint Row Pivots
May 16, 2022Introduction
For a recent Tsql development project involving text document records, the customer wanted a product that would show the latest and most recent earlier version of specific document text stored in a SQL Server 2014 database. One result set row had to hold all relevant information for each document: both document versions as described above, and relevant metadata. This essentially required fine-grained row pivots. This article will describe the engineering behind the solution, and compare that solution with the SQL Server PIVOT operator.
Read more »An overview of DIFFERENCE and SOUNDEX SQL functions
January 18, 2022This article gives an overview of DIFFERENCE and SOUNDEX SQL Server built-in system functions. It explains how to use those functions and how do they work.
Read more »Getting started with SQL Server CLR functions
January 11, 2022This article will explain how to create a SQL Server CLR function stored in a C# class library without creating a SQL Server database project. We will first briefly explain the concept of .NET common language runtime (CLR) and then build a C# class library using the .NET framework. Then, we will use the C# library to create user-defined CLR functions in SQL Server.
Read more »Understanding the SQL MIN statement and its use cases
December 3, 2021Today, I will explain an overview of the SQL MIN () function along with its several use cases in this article. This function is categorized under aggregate functions in SQL Server. Aggregate functions perform a calculation on a set of values from a specified expression and return a single value in their output. Aggregate functions return the same value every time you execute them unless your source data is changed.
Read more »SQL commands in SQL Server
November 22, 2021Introduction
If you are here, it means that you want to learn the SQL commands. This article applies to SQL Server especially, but most of the theory is similar to Oracle, MySQL, MariaDB, PostgreSQL, and other databases. The SQL commands are instructions that we send to the database to get information, manipulate the information or create objects, modify them, and handle the access to the information.
Read more »INDEXPROPERTY() function in SQL Database
November 22, 2021This article will give an insight into the INDEXPROPERTY() function in SQL Databases.
Read more »SQL Syntax Checker Tools
October 27, 2021In this article, we will look at the 2 different SQL syntax checker tools that help to find the syntax errors of the queries without executing them.
Read more »SQL LEFT function in queries
October 22, 2021In this article, we will learn how to use SQL LEFT function with straightforward examples.
Read more »An overview of SQL Comments
October 19, 2021In a typical database, we have multi lines or page SQL statements in a view, SQL statement or the stored procedure. Also, multiple developers change the T-SQL, and it becomes difficult to track who altered the code and for what reason.
Read more »How to write SQL queries with spaces in column names
September 29, 2021In this article, we are going to learn how we can write a SQL query with space in the column name. Blanks spaces are restricted in the naming convention of the database object’s name and column name of the table. If you want to include the blanks space in the object name or column name, the query and application code must be written differently. You must be careful and precise while writing dynamic SQL queries. This article explains how we can handle object names and columns with blank space in SQL Server and MySQL.
Read more »Popular free SQL online compilers
August 9, 2021This article will mention some of the most popular free SQL online compilers that help developers debug and test their SQL code without installing an SQL instance locally or buying one on the cloud.
Read more »Using Stored Procedures with Return Values
August 6, 2021In this article, we will learn how we can use a Stored Procedure with return values with all details.
Read more »How to write subqueries in SQL
August 3, 2021This article briefly explains how to write a subquery in SQL by providing examples.
Read more »Understanding SQL Server DBCC DBREINDEX command and its usage
August 2, 2021In this article, I am going to explain the DBCC DBREINDEX statement, its syntax, and its usage. Additionally, I am also going to cover the differences between the DBCC REINDEX and ALTER INDEX statements.
Read more »