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.


  • Karthikeyan Sekar

    Stuff Function In SQL Server

    Stuff is a function in SQL Server used to perform special operations on a string value.
    Karthikeyan Sekar May 16, 2018
  • 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.
  • Jeeva 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
    Jeeva Subburaj May 14, 2018
  • 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.
  • Hemant Mahajan

    Learn About SQL Server DB Statistics

    In any application persistence of data is required. Database plays a very important role to fill this gap. Microsoft SQL server is one such database. We all know database contains multiple tables t...
    Hemant Mahajan May 08, 2018
  • Sankara Krishnan Venugopal

    Load Data From Database To Text File Using SSIS Package

    Let’s discuss how to connect the database to SSIS package and how to load the table record(s) from database to notepad file. We can pull it into notepad, excel, csv or any other extension that you ...
  • Dinesh Singh Kushwaha (Dev)

    Apply Custom Order In A Given Order Except Ascending And Descending In MSSQL Server

    In this article we will learn how to display records in custom given order except ascending & descending in MSSQL Server.
  • Monica Rathbun

    Five Ways To Examine Cardinality Metrics

    In SQL Server, the query optimizer uses a cardinality estimator to answer data SELECTIVITY questions like the ones below. The optimizer uses this cardinality data, which relies heavy on statistics ...
    Monica Rathbun May 03, 2018
  • Farhan Ahmed

    How To Find The Highest Number Of Employees In a Department Using SQL Server

    In this blog, I will demonstrate how to find the highest number of employees in a particular department using SQL server 2014.
    Farhan Ahmed May 01, 2018
  • Bohdan Stupak

    Money Precision Issues

    This blog shows some primary issue which puts a serious limitation on SQL Server MONEY data type.
    Bohdan Stupak May 01, 2018
  • Ruchi Sharavat

    Save Array Or List Of Records As XML Data To SQL Server In One Call

    In this blog, we will discuss the way to submit the data of a model list to SQL Server to save all records of the list at once. We can do this by converting the model list to XML and then that XML ...
    Ruchi Sharavat May 01, 2018
  • Abhay Dixit

    SQL Server 2016 Service Pack 2 Released

    Recently, SQL Server team has launched service pack 2 of SQL server 2016.
    Abhay Dixit Apr 25, 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 Apr 24, 2018
  • Monica Rathbun

    SQL Server Updates Tricked Me For Years

    When applying a new SQL Server cumulative update, hot fix, or upgrade to SQL Server, it doesn’t always apply all the fixes in the patch. When you upgrade the database engine in-place, databases you...
    Monica Rathbun Apr 24, 2018
  • Farhan Ahmed

    How To Find The Highest Salary In SQL Server

    In this blog we will discuss how to find the highest salary, the second highest salary and N number of highest salaries with different examples.
    Farhan Ahmed Apr 17, 2018
  • Dinesh Singh Kushwaha (Dev)

    Dynamic Pivot Table In SQL Server

    In this video , we will learn how to create dynamic pivot table in SQL server in just 10 minutes
  • Nakul Chaudhari

    Remove Duplicate Rows In SQL Server Using CTE

    In this article, you will learn how to remove duplicate rows in SQL Server using CTE.
    Nakul Chaudhari Apr 15, 2018
  • Farhan Ahmed

    How To Get A Stored Procedure Encrypted In SQL Server

    In this blog, we are going to learn how to get a stored procedure encrypted.
    Farhan Ahmed Apr 11, 2018
  • Shahriar Nikkhah

    Document And Track Changes In Your Tabular Model

    I had a SSAS Tabular Model project and I had few developers making changes on the fly without telling me. My biggest problem was I couldn't track the changes and my client had lots of requireme...
    Shahriar Nikkhah Apr 10, 2018
  • Shahriar Nikkhah

    Looping Through Flat Files Using SSIS 2016

    It's been a long time and I see that everyone is still using old SSIS packages from 2005 up to 2012, but I generally don't see new techniques or approaches being used. So, I decided to writ...
    Shahriar Nikkhah Apr 10, 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 Apr 04, 2018
  • Aniket Narvankar

    Temporary Tables In SQL

    This blog is about temporary tables in SQL, their types, and differences between them.
    Aniket Narvankar Apr 03, 2018
  • Monica Rathbun

    System-Versioned Temporal Tables

    Every once in a while, I like to take a moment and learn something new about the latest SQL Server gizmos and gadgets. Today I came across system-versioned temporal tables and it piqued my interest...
    Monica Rathbun Mar 29, 2018
  • Pragya Nagwanshi

    Monitoring Specific Table Using SQL Profiler

    This article helps you to understand how to use the SQL Profiler, and how to trace a particular table.
    Pragya Nagwanshi Mar 27, 2018
  • View More

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

    Start Learning Now