Format() Function in SQL SERVER

Date Format in SQL Server

Recently, I was working on an SQL query, and I wanted to format a date column value in a USA English format. For this, I tried using the Format() function. In this tutorial, I will explain how to use the format() function in SQL Server with a few real examples. What is the Format() Function … Read more

How to Use LEN Function in SQL Server

Using LEN Function in SQL Server on Literal String

The SQL LEN() function is used to retrieve the length of a string character. Length() is also called LEN. It accepts the string value as a parameter and returns the character present in the string. The number of characters returned is equal to the actual length of the given string. In this SQL Server tutorial, … Read more

How to Insert Data Using Stored Procedure in SQL Server

Execute-stored-procedure-insert-data

We can insert data into the database through different methods. One among them is the stored procedure. In SQL Server, a procedure’s name, parameter lists, and Transact-SQL statements are always included. The stored procedures are the named objects in the SQL Database Server. Applications like Java, Python, PHP, and others can call the procedures, as … Read more

SQL Server Insert Into Select Statement

Insert into Select Statement in SQL Server

In SQL Server, you can use the Insert into select statement to insert data into a table from the SELECT Query. This is useful when copying data from one table to another. Let’s learn more about insert statements in SQL Server Management Studio. The syntax for Insert into Select Statement Below is the syntax for … Read more

How to Delete Duplicate Records in SQL Server

Delete Duplicate Records in SQL Server

It will support the integrity of all the given data, keeping the SQL Server database free from duplicates. The concept of CTE utilizing ROW_NUMBER() helps manage the order number for the number of records, so it is perfect for finding and effectively deleting duplicate records in SQL Server. In this SQL Server tutorial, you will … Read more

ROW_NUMBER Function in SQL Server

SQL Server Row_number

ROW_NUMBER() is a common function in SQL Server. It generates a number in sequential order for each row, beginning with 1. To make sure that the numbers are assigned in the correct order, we must always use the ORDER BY procedure. Data types of BIG INT are used for the values that this function returns. … Read more

Stored Procedure Naming Convention

Do you know the naming convention for the stored procedure? If not, no worries. Follow this simple and easy tutorial to see the rules for naming conventions in stored procedures. Stored Procedures in SQL Server A stored procedure consists of one or more statements that perform specific tasks. They usually include statements that are used … Read more

SQL Server Set identity_insert

SQL Server Identity insert

Are you aware of the SQL Server Set identity_insert function? If not, follow this tutorial to learn more about this. What is identity_insert? The IDENTITY_INSERT tells an SQL Server’s table whether to allow the identity column’s value to be inserted. Use identity_insert in Table Let’s look into the simple creation of a table using the … Read more

How to Add Identity to Existing Column in SQL Server

Identity columns are essential in maintaining data integrity and helping you develop the ability to perform operations with data efficiently under database management. Therefore, when you add identity to existing column in SQL Server, it will allow smooth data operation and high system performance. This SQL Server tutorial explains the concept of identity in a … Read more