SQL Server MAX Date

SQL Server MAX Date

In this article, I’ll explain various methods for finding and working with the max() for date in SQL Server with multiple examples. SQL Server MAX Date The foundation of finding the most recent date in SQL Server is the MAX function, which returns the highest value in a selected column. When applied to date columns, … Read more

SQL Server DateTime To Date

SQL Server DateTime To Date

As a Senior SQL database developer, I’ve encountered various scenarios where I needed to extract just the date portion from a DateTime value in SQL Server. I’ll walk you through different methods to convert DateTime to Date format in SQL Server with examples in this article. SQL Server DateTime To Date SQL Server derives all … Read more

SQL Server Get Current Date

SQL Server Get Current Date

As a senior database developer working with SQL Server, I’ve found that retrieving the current date and time is one of your most fundamental operations. In this comprehensive article, I’ll walk you through various methods to get the current date in SQL Server and share best practices based on real-world examples. SQL Server Get Current … Read more

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