SQL Server
Welcome to SQL Server section of C# Corner. In this section, you will find various SQL Server related source code samples, articles, tutorials, and tips.


  • Abrienne Jonethan

    How To Rebuild Master Database In SQL Server Without Backup

    Here, we will discuss the full procedure to rebuild Master Database in SQL Server without unavailability of backup. Read the complete blog very carefully to get appropriate results.
    Abrienne Jonethan Nov 18, 2018
  • Abhay Dixit

    SQL Server Management Studio 18.0 Preview 5 Available Now

    Recently, Microsoft has released the Preview 5 of SQL Server Management Studio 18.0. This is the second public preview of SSMS 18.0.
    Abhay Dixit Nov 17, 2018
  • Sanwar Ranwa

    Aggregate Function in SQL Server

    In this blog, we will learn about aggregate function in SQL Server. An aggregate function is used to calculate the given values and returns a single value.
    Sanwar Ranwa Nov 16, 2018
  • Jasminder Singh

    Row_Number Function in SQL Server

    This article explains the row_number function in SQL Server. Ranking functions provide a very good feature of assigning numbering to the records in the result set in SQL. Row_Number is one of these...
    Jasminder Singh Nov 16, 2018
  • Vishal Pawar

    How Should We Store Images And Blob Files In SQL Server

    There is always a requirement from developers: How should I store images and BLOB files in SQL Server ? In this post let's explore the data types and methods used for storing Binary Large Objec...
    Vishal Pawar Nov 15, 2018
  • Pankaj  Kumar Choudhary

    Pivot And Unpivot In SQL Server

    In this article we will learn how to use pivot and unpivot relational operator in SQL Server.
  • Sanwar Ranwa

    Date And Time Functions In SQL Server

    In this article we learn about Date and time functions in SQL Server.These functions are working on given date and time.These functions are SQL Pre defined functions.
    Sanwar Ranwa Nov 14, 2018
  • Bohdan Stupak

    Some Common Mistakes When Querying SQL Database

    When I started learning SQL, I found out several issues, which I thought to be interesting to share. For our needs, let us use AdventureWorks2012 database, which can be obtained here.
    Bohdan Stupak Nov 12, 2018
  • Jitendra Waghale

    Overview Of Stored Procedure In SQL server

    In this blog, we will discuss how to work with Stored Procedure and explain the concept with an example in a simple way. I hope this is very useful for beginners and intermediate to help them under...
    Jitendra Waghale Nov 12, 2018
  • Kapil Gaur

    How To Return Boolean Values From SQL Server

    Here, I will tell you the possible ways to return calculated Boolean values from SQL Server code. At a lot of places, you want to progress conditionally. You send some input values to the stored pr...
    Kapil Gaur Nov 05, 2018
  • Rohit Kainth

    Covering Indexes And Filtered Indexes In SQL

    Hello Learners. I hope you all are doing great. This article describes the Covering Indexes and Filtered Indexes. I would like to tell you that these type of Indexes can only be created as NONCLUST...
    Rohit Kainth Nov 02, 2018
  • Monica Rathbun

    How Much Will Compression Really Gain Me

    Did you know that compression can gain you more than just space on a disk; it can allow you to fit more data into the buffer pool? That means queries have faster and more efficient reads which can ...
    Monica Rathbun Nov 02, 2018
  • Amit Kumar

    How To Check If A String Contains A Substring In SQL Server

    This blog explains how to check, if a string contains a substring in SQL Server or not.
    Amit Kumar Oct 30, 2018
  • Farhan Ahmed

    How To Find Random Record In SQL Server

    In this blog. I will explain you how to find random record in SQL server. This is most common interview question. The CHECKSUM function returns the checksum value computed over a table row, or over...
    Farhan Ahmed Oct 25, 2018
  • Hardik Deshani

    How To Calculate Time (Years, Months, And Days) Between Two Dates

    In this post, we will learn how to calculate the time between two dates in years, months, and days format. There is a special function for getting a perfect year, month, and day count.
    Hardik Deshani Oct 25, 2018
  • Jitendra Waghale

    Views In SQL Server

    In this blog, we will discuss how to work with Views in SQL Server and explain concepts with an example in a simple way. I hope this is very useful for beginners to help them understand the basic c...
    Jitendra Waghale Oct 25, 2018
  • Rohit Kainth

    Merging Different Row Cells Into One In SQL

    This article is about merging different row cells into one for the purpose of reporting. Sometimes we need to customize according to the client’s requirements.
    Rohit Kainth Oct 24, 2018
  • Rohit Kainth

    Updating Dynamic Columns On The Go In SQL

    I hope you all are doing fine. This particular article is about updating the dynamic columns on the go.
    Rohit Kainth Oct 24, 2018
  • Monica Rathbun

    Keeping Large Table Statistics Current - TF2371

    Statistics are the magic ingredient that helps the query optimizer create its best guess for generating an execution plan. Keeping statistics as accurate as possible will give the optimizer the inf...
    Monica Rathbun Oct 24, 2018
  • Zia Ahmed Shaikh

    Creating A Database In SQL Server 2017 - A Quick Recap

    In this video session, we will quickly walk through the steps of creating a simple Database in SQL Server 2017 Express Edition.
    Zia Ahmed Shaikh Oct 24, 2018
  • Manoj Kalla

    How To Create A Stored Procedure In SQL Server Management Studio

    In this article you will learn about how to create stored procedure in SQL SERVER MANAGEMENT STUDIO. What is Store Procedure? Why do we use SET NOCOUNT ON in stored procedure? How to write comment ...
    Manoj Kalla Oct 23, 2018
  • Nitin Pandit

    Most Asked SQL Server Interview Questions and Answers

    In this article you will learn about the most asked SQL Server Interview questions. Top 50 SQL Server Interview Questions and Answers. How to delete a table in SQL Server? What is a function in SQL...
    Nitin Pandit Oct 23, 2018
  • Sanwar Ranwa

    Identity Column In SQL Server

    In this article, we will learn about identity function and how we Reset Identity Column in SQL Server. Identity keyword is used in SQL Server to Auto Increment Column value.
    Sanwar Ranwa Oct 22, 2018
  • Nikunj Satasiya

    How To Display Date And Time In Duration (Such As One Hour Ago) In SQL Server

    Today, in this post, I am going to explain the SQL statement which is used to to get the date and time difference in a valid format like 1 hr ago, or 30 min ago, or 1 week ago, 1 month ago, and so ...
    Nikunj Satasiya Oct 17, 2018
  • Karthikeyan Anbarasan

    SQL Server Integration Services (SSIS) - Real time Examples Of Data Flow Transformations In SSIS

    In my series of articles there are a few scenarios where we need to take care of some real-world samples and examples to help explain concepts to the end users. This is part 49 of the series of art...
  • View More