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.

Articles

  • Get Data Using SQL Stored Procedure Into Excel

    In this article, we will see how to fetch data from SQL DB into Excel file on demand.
  • Useful SQL Queries

    In this article, we'll learn some basic but useful SQL queries.
  • Using CLR With SQL Server 2012

    In this article, I’ll cover the SQL CLR in SQL Server 2012.
  • Create Your First CLR Trigger in SQL Server 2008 Using C#

    CLR Trigger for SQL Server. Here you will see how to create your first CLR Trigger for SQL Server 2008 using C#.
  • How to use RowCount in SSIS

    RowCount in SSIS. Here you will see how to use RowCount in SSIS.
  • A Simple Use of Case Statement in SQL Server 2012

    This article will give you an idea of how to use a Case expression in SQL Server.
  • How to Create Database Backup in SQL Server 2012

    In this article, I am going to explain how to create a database backup in SQL Server 2012.
  • Data Encryption and Decryption in SQL Server 2008

    Cryptography can be implemented in the SQL Server. This article explains about the encryption and decryption of data in SQL Server.
  • Using Case With Select and Update Statement in SQL Server 2012

    In this article, I would like to show the most commonly used case expressions with update statements in SQL Server. 
  • Passing Table Valued Parameter to Stored Procedure: Part 2

    Here you will see how to pass a table valued parameter to a Stored Procedure.
  • Passing Table Valued Parameter to Stored Procedure: Part 1

    In this demonstration I am taking simple scenario, where I will to pass customers information to stored proc and insert customer rows into database.
  • Cross Apply And Outer Apply in SQL Server

    In this article you will learn about Apply operator in SQL Server and its types with example. Learn Cross Apply And Outer Apply in SQL Server.
  • Passing DataTable to StoredProcedure as Parameter in C#

    This article describes how to pass a DataTable to a Stored Procedure as a parameter using ADO.NET in C#.
  • Convert Rows to Columns in SQL Server

    This article will help to convert values in rows to column/fields name or headers.
  • Clustered Index and Non-Clustered Index in SQL Server

    Here we are going to discuss clustered and non-clustered indexes in SQL Server.
  • SQL Database Mail Profile Name is Not Valid in SQL Server 2012

    This article explains how to send emails using the msdb.dbo.sp_send_dbmail Stored Procedure as a non-sysadmin user in SQL Server 2012.
  • How Should We Store Images And Blob Files In SQL Server

    Storing images in a SQL Server database is a common task. Binary Large Objects also know as BLOBs, are lager data files such as images and sounds. In this article, you'll learn how to store images using SQL BLOB in SQL Server.
  • Schema In SQL Server

    This article explains schemas in SQL Server. A SQL schema in a database is a collection of logical structures of data.
  • Difference Between Stored Procedure And Function In SQL Server

    This article describes the differences between Stored Procedures and Functions in SQL Server.
  • Full Outer join and Cross Join in SQL Server

    In this article, I explain SQL full outer join and SQL cross join in SQL Server.