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.


  • Surinder Bhomra

    Alternative To SQL "In" Condition When Working With Many Values

    In this post, we will be discussing an alternative to using a SQL “IN” condition, where many values need to be parsed to the SQL query through the use of a User Defined Data Type to get exact recor...
    Surinder Bhomra Feb 20, 2018
  • Prashanth J

    Passing Multiple Parameters In SQL IN Clause With SQL Command

    Today, I am going to discuss about retrieving the records based on the values in a specific column in SQL database using "IN CLAUSE".
    Prashanth J Feb 01, 2018
  • Sateesh Arveti

    SQL Server - Invalid Column Name ‘ABC’ Error While Accessing Newly Added Column

    In this blog, we will look into steps to be followed for fixing invalid column name ‘ABC’ Error while accessing a newly-added column.
    Sateesh Arveti Jan 22, 2018
  • Dharmraj Thakur


    The word “Manipulation” means to play with the data, not only retrieve or fetch the data. We can include retrieve, store, modify, delete, insert, update and copy operations in DML.
    Dharmraj Thakur Jan 14, 2018
  • Nishan Aryal

    How To Backup All Databases In SQL Server

    When we have more databases on a Server to backup, it is very time-consuming to backup all databases manually. In such cases, we can use T-SQL to automate these tasks. We can use SQL Server Managem...
    Nishan Aryal Jan 10, 2018
  • Nikunj Satasiya

    Remove Duplicate Records From A Table In SQL Server

    In this blog i am going to explain how to remove duplicate records from a table in SQL Server.
    Nikunj Satasiya Jan 03, 2018
  • Sagar Shinde

    Using CASE Statements In A SQL UPDATE Query

    I have SQL server Table in which there is column that I wanted to update according to a 2 columns value that are present in current row. In this scenario, we can use CASE expression. CASE expressio...
    Sagar Shinde Dec 20, 2017
  • Manish Pandey


    Email Address is truncated with the use Convert and Varchar.
    Manish Pandey Dec 13, 2017
  • Andrew Jackson

    Transfer Database From SQL Server 2008 To 2014

    Transfer database from SQL Server 2008 to 2014 using different migration techniques with the help of this article.
    Andrew Jackson Dec 12, 2017
  • Pramod Thakur

    Ways Of Finding Foreign Key In SQL Server

    In this blog, we are trying to find in how many ways, we can find foreign key in SQL Server.
    Pramod Thakur Dec 09, 2017
  • Nikunj Satasiya

    How To Pass Output Parameter To Stored Procedure In SQL Server

    In this tutorial, I will explain how to pass the output parameter to a stored procedure in MS SQL Server.
    Nikunj Satasiya Dec 08, 2017
  • Mohamed Elqassas Mvp

    SQL Server 2017 - Check The Advanced Analytics Status

    Check the Advanced Analytics status using SERVERPROPERTY In SQL Server 2017/2016
  • Mohamed Elqassas Mvp

    SQL Server - Check If The Failover Cluster Is Configured Or Not

    Check if the failover cluster is configured or not using SERVERPROPERTY In SQL Server.
  • Mohamed Elqassas Mvp

    SQL Server - Get The Default Path Of Data And Log Files

    SQL Server: Get the default path of data and log files via SERVERPROPERTY
  • Mohamed Elqassas Mvp

    SQL Server - Get the Installed Product Edition

    In this blog, we will see how to Get the installed product edition using "SERVERPTOPERTY".
  • Mohamed Elqassas Mvp

    SQL Server - Get The Collation Details

    SQL Server: Get the Collation Details using SERVERPROPERTY
  • Mohamed Elqassas Mvp

    SQL Server - Check If The Server Is In Single-User Mode

    SQL Server: Check if the Server is in single-user mode using ServerProperty
  • Mohamed Elqassas Mvp

    SQL Server - Check The Integrated Security Mode

    Check the integrated security mode using SERVERPROPERTY in SQL Server
  • Mohamed Elqassas Mvp

    SQL Server - Check If Always On Availability Of Groups Is Enabled Or Disabled

    Let's learn how to check if the "Always On" Availability of Groups is enabled or disabled using SERVERPROPERTY in SQL Server.
  • Mohamed Elqassas Mvp

    SQL Server - Check The "Always On" Availability Group Manager's Status

    Check the "Always On" availability groups manager status using SERVERPROPERTY in SQL Server.
  • View More