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.


  • Nikunj Satasiya

    Insert XML Data In Database Using Stored Procedure In SQL Server

    In this article, I’ll explain how to insert data from XML Sheets using SQL server.
    Nikunj Satasiya Mar 24, 2018
  • Monica Rathbun

    What Are These Backup Settings All About

    I ran across a client the other day that had these Backup and Recovery options set like the picture below because it defaults this way.
    Monica Rathbun Mar 23, 2018
  • Deepak Kaushik

    Let's Import Data To Azure SQL Data Warehouse Using SSIS

    We have already discussed many ways to import data in Azure DWH. Today I will discuss an OLD SCHOOL approach of data import by SQL Server Integration Services (SSIS). In my opinion, this is the mos...
    Deepak Kaushik Mar 21, 2018
  • Srashti Jain

    Pre-Deployment And Post-Deployment Script - SQL Database Project

    In this article, we will learn Pre-Deployment And Post-Deployment Script on SQL Database Project.
    Srashti Jain Mar 20, 2018
  • John Morehouse

    Learn About SSMS Output Window

    In my experience, there have been occasions where SQL Server Management Studio (SSMS) becomes unresponsive for a length of time. In one particular case, this occurred while I was expanding the list...
    John Morehouse Mar 17, 2018
  • Monica Rathbun

    Hide And Group Columns In SSRS Using A Parameter

    Ever had users come to you and request another version of a report just to add another field and group data differently? Today, was such the day for me. I really don’t like having multiple versions...
    Monica Rathbun Mar 16, 2018
  • John Morehouse

    Four Rules Of Right When Running A Query

    Earlier this year, I participated in the Idera #sqlchat. This is a monthly chat meeting that is organized by Idera Software and hosted by a SQL Server community member. This one was hosted by Moni...
    John Morehouse Mar 13, 2018
  • Harinder Kumar

    Some Useful And Tricky Queries

    Today, I am going to share some useful and tricky SQL queries that have helped me a lot.
    Harinder Kumar Mar 12, 2018
  • John Morehouse

    Using SWITCH On A Single Partition

    Several months ago, I was looking at a question posted on ask.sqlservercentral.com. I discovered an answer to a question regarding how to move a large amount of data around quickly. The solution w...
    John Morehouse Mar 12, 2018
  • Sagar Shinde

    How To Insert Bulk Records Into SQL Server Using XML Data Type

    Sometimes, there is a need to insert bulk records into a database. In some cases, we have multiple unique records and that all needs to be inserted into the database. Instead of hitting the databas...
    Sagar Shinde Mar 11, 2018
  • Padmalatha Dronamraju

    Temporary Tables In SQL Server

    Often as a developer, we come upon a situation where we want to store some intermediate results temporarily. So in such cases, Sql Server provides us with a feature called temporary tables which ca...
  • Israr Ali

    A Scenario Based SQL Interview Queries/ Test Model/Training

    A scenario-based SQL interview queries with the schema which is equally meaningful for new students as training material.
    Israr Ali Mar 07, 2018
  • Monica Rathbun

    What Is Date Correlation Optimization?

    OK So, I am doing some digging and peaking around again in SQL Server and came across a database option called Date Correlation Optimization Enabled = False. Honestly, I had no clue what it did, so...
    Monica Rathbun Feb 28, 2018
  • Nitin Sontakke

    Interview Question I Couldn't Answer

    I consider myself fairly good at SQL Server but couldn't answer a question.
    Nitin Sontakke Feb 26, 2018
  • Monica Rathbun

    What Does This Little Check Box Do

    Ever wander around SQL Server properties and wonder what these little check boxes turn on? I do, and I get very tempted to check them. Here is one of those tempting little boxes that seems pretty h...
    Monica Rathbun Feb 21, 2018
  • 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
  • Monica Rathbun

    VLFs - The Forgotten Foe

    How many of you check the amount of Virtual Log Files (VLFs) your transaction logs have?
    Monica Rathbun Feb 20, 2018
  • Monica Rathbun

    How To Get Started With Always Encrypted For Beginners - Part Three

    A few weeks ago, I wrote Part 1 and 2 of this series, which was a beginner’s guide to Always Encrypted. In part 3, I am going to go over what road blocks I ran into when trying to implement this so...
    Monica Rathbun Feb 15, 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 Feb 15, 2018
  • Monica Rathbun

    How To Get Started With Always Encrypted For Beginners - Part Two

    In this post we will pick up where we left off in Part 1, if you haven’t read that please go back and do so. Now that we have encrypted our columns, it’s time to take a look at how we decrypt them ...
    Monica Rathbun Feb 12, 2018
  • Monica Rathbun

    How To Get Started With Always Encrypted For Beginners - Part One

    Encryption has always been intriguing to me but seemed like it could be a very complex process to set up. However, SQL Server made it very simple when they introduced Always Encrypted (AE) into SQL...
    Monica Rathbun Feb 08, 2018
  • Monica Rathbun

    Synchronous VS Asynchronous Statistics Updates

    Implement to help with performance is changing from Update Statistics Synchronous to Auto Update Statistics Asynchronously.
    Monica Rathbun Feb 07, 2018
  • Vaidehi Pandere

    Cursors In SQL Server

    A cursor is a database object which is used to retrieve data from result sets one row at a time.The cursor can be used when the data needs to be updated row by row.
    Vaidehi Pandere Feb 06, 2018
  • Monica Rathbun

    SQL Sequence Vs Identity Column

    Let’s take a look at what a Sequence is in relation to an Identity Column in SQL Server. Did you know Sequence even existed? I didn’t until I was asked about them. It’s amazing how much you can ski...
    Monica Rathbun Feb 06, 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
  • X

    Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

    Start Learning Now