This article will explain various aspects of security testing for the SQL Server environment. Security is a very critical area for any database environment. We must properly plan, deploy, and audit database security measures to protect and prevent any unauthorized access of the data. We should also perform regular security testing to ensure we have the right set of rules and policies in place to secure our database environment. Database security measures also help any organization to protect its data to maintain its privacy and integrity.
Read more »T-SQL
SQL percentage calculation examples in SQL Server
January 19, 2022In this article, you will see the different ways to calculate SQL percentage between multiple columns and rows. You will also see how to calculate SQL percentages for numeric columns, grouped by categorical columns. You will use subqueries, the OVER clause, and the common table expressions (CTE) to find SQL percentages.
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 »Getting started with the SQL UPDATE syntax
December 22, 2021This article will help you understand the SQL UPDATE syntax used in SQL Server. Microsoft SQL Server is a database system that is used to store various types of data which is logically arranged in form of tables, columns, and rows. As businesses need changes or new requirements come, we need to modify this data stored in the table. We use the SQL UPDATE syntax to modify or update existing data in a table or view in SQL Server. We can use this statement to modify a single unit of data field as well as multiple sets of data fields based on our requirements.
Read more »SQL Server GETDATE () function and its use cases
December 16, 2021This article will discuss an overview and use cases of the SQL Server GETDATE () function which is used to return the current date and time of the system on which SQL Server instance is running. There are several date-time related functions in SQL Server for distinct requirements like SYSDATETIME, CURRENT_TIMESTAMP, etc. All these functions will return the current date-time of the system on which the SQL Server is running. The only difference of having these many functions is the accuracy of the length of timestamp like till what precision you want to return your date time output. I will show you the output of some of these date-time functions and compare them with SQL Server GETDATE () function.
Read more »SQL Queries in SQL Server – a beginner’s guide
December 15, 2021Introduction
Creating SQL Queries is a straightforward process. This article is made in SQL Server, but most of the content can be applied to Oracle, PostgreSQL, MySQL, MariaDB and other databases with few changes. The SQL queries allow us to send queries to a database. In this article, we will have a fast, practical tutorial about doing your own queries from scratch.
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 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 »SQL queries to change the column type
September 22, 2021This article covers the different SQL queries to change the column type. We are going to learn how we can change the data type of the columns of the following databases:
Read more »How to gain advanced T-SQL programming skills
August 11, 2021This article aims to provide various tricks that help to gain advanced T-SQL programming skills.
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 »How to calculate Subtotals in SQL Queries
July 30, 2021In this article, we will learn how to calculate and add a subtotal in SQL queries.
Read more »An overview of the SQL Server ISNUMERIC function
July 2, 2021This article gives an overview of the SQL Server ISNUMERIC built-in system function. It explains how to use this function, illustrates its limitations, and provides some alternatives.
Read more »Common Table Expressions for Database Developers
June 24, 2021Introduction
Though the Common Table Expressions (CTE) were introduced to SQL Server more than a decade ago with the SQL Server 2005 version, still this is not much utilized by database developers due to the unawareness. This article provides what and how you can utilize the CTE effectively and efficiently.
Read more »GROUP BY ROLLUP for Data Analysis
June 23, 2021Introduction
In this article, we are looking at T-SQL commands of GROUP BY ROLLUP to aggregate data and improve the data analytical capabilities in SQL Server.
Read more »SQL GO command in SQL Server
May 18, 2021Introduction
If you are using SQL Server and saw a GO command in a T-SQL script and you do not know what that GO is used for, this article is for you. In this article, we will explain what the SQL GO command is when to use it, and some tips about using it.
Read more »Learn SQL: How to prevent SQL Injection attacks
May 17, 2021In the previous articles we’ve talked about SQL injection and dynamic SQL but we lacked an answer on how to prevent SQL injection attacks. Today we’ll do exactly that and show you one possible approach to how to do it. We’ll also mention other possible threats and approaches you could take.
Read more »Top free T-SQL training videos
April 28, 2021This article mentions some of the top free T-SQL training videos available on the internet.
Read more »SQL Definition
April 21, 2021Introduction
In this article, we will provide a SQL definition and we will explain what it is, and we will also talk about the SQL extensions. We will also provide some examples of SQL Syntax.
Read more »Working with parameters in the sp_executesql stored procedure
April 16, 2021This article explains how to use the sp_executesql system stored procedure to run static and dynamic SQL queries and how to pass input and output parameters while using it.
Read more »