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.


  • Usama Shahid

    SQL Server And Relational Database - Part One

    In this article, we will discuss SQL Server And Relational Database.
    Usama Shahid Jul 20, 2018
  • Kapil Singh Kumawat

    FOR JSON Clause With AUTO Mode In SQL Server 2016

    JSON stands for JavaScript Object Notation. JSON is a lightweight format which is used for storing and interchange the data. JSON uses standard javascript function to convert JSON data into native ...
  • Jefferson S. Motta

    How To Make Faster SQL Server Search - Part One

    Do a small change on database and on your query to make it faster.
    Jefferson S. Motta Jul 19, 2018
  • Hadshana Kamalanathan

    Migrate SQL Server Database To Azure SQL Server

    I will also try to share my experiences. When I was moving from SQL Server to SQL Azure for the first time. My first article of this SQL Server database to Azure SQL Server Import and Export Wizard...
  • Kapil Singh Kumawat

    Using Window Ranking Function With UPDATE Statement

    In this article, we will learn using Window Ranking Function With UPDATE Statement.
  • Kapil Singh Kumawat

    Drop Indexes In Views In SQL Server

    In this article, I am going to tell about dropping of indexes in view in SQL Server.
  • John Morehouse

    File Growth Rate: The GUI Lies

    If you are like me, you use the SSMS GUI for various things. Though I tend to use scripts for the management of most things, I do check on the database growth rates of files using the GUI interface.
    John Morehouse Jul 12, 2018
  • Packiaraj Santhiyagu

    Auto Query Generator In MSSQL Server

    If you’re a developer, irrespective of the platform, you would have to work with Databases. Creating SQL statements for tables is quite often a monotonous job and it gets hectic especially with dea...
  • Monica Rathbun

    Contained Database - No Need For Server Level Logins Anymore

    Starting in SQL Server 2012 and in Azure SQL Database, Microsoft introduced the concept of a contained database. A contained database is a database that is completely un-reliant on the instance of ...
    Monica Rathbun Jul 06, 2018
  • Suvendu Shekhar Giri

    Trick To Use Dark Theme In SQL Server Management Studio 2017

    SQL Server Management Studio (SSMS) has been the favourite tool among SQL Server users as it comes as an integrated tool for managing SQL Infrastructure as well day to day tasks like deploy, monito...
  • S.Saravana Kumar

    Multiple SQL Operation In Single Procedure

    In Single Procedure, we will write multiple SQL operations. Based on the request the corresponding SQL operations will execute.
    S.Saravana Kumar Jul 02, 2018
  • John Morehouse

    Finding Composite Primary Key Columns

    I had to work with composite primary keys recently while working on a project for a client. More specifically, I had to create a process that would dynamically (dynamic SQL?! Say it isn’t so?!) ha...
    John Morehouse Jul 02, 2018
  • Prashant Goswami

    Learn Oracle PL/SQL - Create & Use View

    Do you know the type of views ,how to create them and their uses. In this blog I will tell you about views , how you can use them practically. Before that I want to tell you that this is my third b...
    Prashant Goswami Jun 21, 2018
  • Monica Rathbun

    Replication Of Max Text Length

    Ever seen the below error? Until this week I hadn’t. So, I figured I’d take a little time and introduce it to those that had not.
    Monica Rathbun Jun 21, 2018
  • Jignesh Kumar

    Difference Between ROW_NUMBER, RANK, and DENSE_RANK In SQL Server

    Ranking functions returns a ranking value for each row either in a partition, or not. We can produce the very same result for all functions, but they have different purpose.
    Jignesh Kumar Jun 20, 2018
  • Sankara Krishnan Venugopal

    Load Database Records To Another Table And Excel Sheet Using SSIS

    In this session, we will briefly discuss how to load data from one table to another table and Excel sheets at the same time using SSIS package.
  • Monica Rathbun

    How To Get Started With Always Encrypted For Beginners - Change Is Coming - Part Four

    A few weeks ago, I wrote Part 1, 2 and 3 of this series, which was a beginner’s guide to Always Encrypted. In part 4, I am going to talk about the changes that are coming in vNext of SQL Server.
    Monica Rathbun Jun 14, 2018
  • Sanjib Barik

    Remove Duplicate record from a table using CTE

    In this blog we will discuss how to remove duplicate record from a table using CTE. Without using TOP, MAX. There is a table name Employee and three columns like EmpId, EmpName, Salary.
    Sanjib Barik Jun 07, 2018
  • 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 Jun 07, 2018
  • Hardik Deshani

    How To Get All Row Count For All Tables In SQL Server Database

    In this post, we will learn about how to get all tables records count from the selected database. Here we are using sys.objects and sys.partitions for getting the record count. Here we are using jo...
    Hardik Deshani Jun 07, 2018
  • Jeevanatham Subburaj

    Simultaneous Data Queue Polling Request Processing In SQL Server

    This article explains how to implement simultaneous data queue processing using SQL Server. In many of our enterprise applications, we have the design to handle incoming request coming from multip...
  • Dinesh Singh Kushwaha (Dev)

    How To Create CLR Triggers In C# And Install And Uninstall CLR Assembly In MSSQL Server

    In this article, we will learn how to create CLR Triggers in C# and install & uninstall CLR assembly in MSSQL Server.
  • Jeevanatham Subburaj

    SQL Server Tips - SQL Server Paging Made Easy With OFFSET And FETCH Keyword

    This post contains SQL Server tips for applying paging in SQL that can be used in real-world applications for long-running processing with better performance
  • Dinesh Singh Kushwaha (Dev)

    Create CLR Stored Procedure With And Without Namespace In C# And Install And Uninstall CLR Assemb...

    In this article, we will learn how to create a CLR Stored Procedure with & without namespace in C# and install & uninstall CLR assembly in MSSQL Server.
  • Sankara Krishnan Venugopal

    Create A Job In SQL Server

    In this session, we are going discuss how to create the SQL JOB, how to connect the Job with SSIS package and how to schedule the job on server.
  • View More