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.


  • 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
  • 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
  • Sateesh Arveti

    Introduction To SQL Server Pagination

    In this video, we will look into retrieving records in page wise from SQL Server using OFFSET-FETCH statement.
    Sateesh Arveti Jan 22, 2018
  • Dennis Thomas

    Stored Procedures Vs User Defined Functions And Choosing Which One To Use

    In SQL Server, we usually come across queries, tables, views, stored procedures and functions. People often wonder what are the real differences between User Defined Functions (UDF) or simply funct...
    Dennis Thomas Jan 16, 2018
  • Suraj Krishnan

    Comparison Of Subquery And Joins

    Here, in this article, we are comparing the SQL Join and SQL Subquery.
    Suraj Krishnan Jan 15, 2018
  • Priti Kumari

    Why Dynamic Query Is Bad

    In this article, we will be talking about Dynamic Query and why it is bad.
    Priti Kumari Jan 15, 2018
  • Sateesh Arveti

    Understanding SQL Server Transparent Data Encryption

    In this video, we will look into the encryption of SQL Server Database using TDE.
    Sateesh Arveti Jan 15, 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 11, 2018
  • Jaipal Reddy

    Difference Between Primary key, Unique key And Foreign Key

    In this blog we will learn the basic differences between Primary key, Unique key and Foreign key.
    Jaipal Reddy Jan 09, 2018
  • Sateesh Arveti

    Introduction To SQL Server Dynamic Data Masking

    In this video, we will discuss SQL Server Dynamic Data Masking feature to hide\mask sensitive data.
    Sateesh Arveti Jan 09, 2018
  • Nirav Daraniya

    Store And Retrieve Using FILESTREAM From SQL Database

    Hello friends today I will explaining you regarding storing and retrieving image, video and other document files from SQL server using FILESTREAM future. If you are new to FIELSTREAM then read my p...
    Nirav Daraniya Jan 06, 2018
  • Sateesh Arveti

    Look At SQL Server Encryption - Part I

    In this video, we will look at SQL Server encryption followed by a demo where we will encrypt a column in the table.
    Sateesh Arveti Jan 05, 2018
  • Nirav Daraniya

    FILESTREAM Feature In SQL Server

    Today I am explaining what FILESTREAM is and how to use FILESTREAM in SQL server.
    Nirav Daraniya Jan 04, 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
  • View More