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 Execute Stored Procedure for Update in SQL Server?

Update Table in SSMS by Stored Procedure

If necessary, you might need to update the data while working in the organization. Modifying or creating an entire table will be time-consuming. Here, we will create a new stored procedure for updating and then execute that procedure through the query or SQL Server Management Studio with real-world examples. In this SQL Server tutorial, we … 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

SQL Server Select Newest Record

Newest-record-in-SQL-Server

Getting the latest record from the table is an easy and simple method, and you do not need much knowledge of SQL to do so. You may want to retrieve the most recent record from the table with every column, or you may want to retrieve just particular columns. This tutorial will discuss simple and … 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