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.


  • SQL Server ISNULL() With Multi Column Names

    Many times we come across null values within tables in SQL Server. Null values are the values with no data; that means the data is missing or unknown. In this article, initially we will understand ...
  • 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.
  • 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.
  • 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.
  • 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...
  • 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.
  • Resolving The "Wait Operation Timed Out" Error When TFS Stops Working

    A few days ago our system administrator installed the Microsoft test manager 2012 on Microsoft Team Foundation Server 2010(TFS 2010). Suddenly our TFS stopped working. TFS was not able to extract t...
  • TRY...CATCH And RAISERROR With Stored Procedure

    In this article, we’ll see how to handle the error and raise an error in SQL Server with a stored procedure.
  • How To Track Changes In Stored Procedure, Function, And View In SQL Server

    SQL Server DDL Trigger is a special kind of trigger that fires in response to Data Definition Language (DDL) statements – CREATE, ALTER, DROP (Table, Function, Index, Stored Procedures, Views.. etc).
  • Generate SQL Table, Store Procedure and C# Class Via Uploading Excel

    I am explaining how we can create Table, Store procedure , and C# class via uploading excel and it can save developer’s time.
  • How To Clean SSISDB History Periodically

    This blog exclusively explains the process of cleaning the execution history of SQL Server Integration Services packages from SSISDB.
  • Union V/S Join In SQL

    In this blog, we will learn about the differences between Union and Joins in SQL. Union and Join, both are used to combine the data from two or more tables.
  • 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...
  • T/SQL Part - One

    In this Article, we will learn about T/SQL and difference between SQL and T/SQL.
  • T/SQL - Part Two

    In this article, we Learn about Cursor, types of Cursor in details with example.
  • Joins In SQL Server

    Joins are used to Fetch data from two or more than two tables based on some conditions. Joins is one of the most important concepts of SQL Server. We can retrieve Data from multiple Table using Joi...
  • Triggers In SQL Server

    In this blog, you will learn about Triggers in SQL Server and I will explain the concept of triggers with an example in a simple way.
  • Operators In SQL Server

    An operator is a symbol which is used to perform some actions on the given expressions.
  • Data Integrity In SQL Server

    Data Integrity is used to maintain Accuracy and consistency of data in the Table.
  • How To Use TRY CATCH In SQL Procedure

    In this post, we will learn about how to use TRY CATCH in SQL Procedure and store error with error text and procedure with the line number in the table. Here is a simple example for generating the ...
  • View More