In Focus
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.

RECENT POSTS

  • Using Column Group Subtotal/Grand Total Value Outside The Matrix Table

    In order to use the grand total of matrix column group values outside of the Matrix. I am going to insert one new Tablix from toolbar then add some expression in header row to get the sum of column gr
  • Scalar Function In SQL Server

    This article demonstrates how to create and use a scalar function in the SQL Server database. In this blog, we won't go very far. We will perform only basic functions.
  • Introduction to NoSQL Concept

    This article introduces the NoSQL concept. There are many NoSQL databases available like MongoDB, Elastic Search and Hadoop and so on.
  • Static Data Masking (SSMS 18.0 Preview)

    In SSMS 18.0 preview, Microsoft has introduced us to Static Data Masking, a new feature that allows you to create a cloned copy of your database and replace sensitive data with a new data (fake data,
  • Overview Of MSSQL Logs

    Database Logs are used for any modification/transaction on table production or during development from their Database Server.
  • SQL Server Development Best Practices Guide

    We all use best practices while writing SQL code. However, for those who use on or off the MS laied out best practices and new to the database platform would be highly benefited while following the be
  • Group By Aggregate Functions In SQL

    Aggregate functions are the built-in functions in SQL. They are used for specific operations like to compute the Average of the numbers, Total Count of the records, Total sum of the numbers etc. These
  • Step By Step SSRS in 11 Hours: Hour 7

    This article shows how to create a sub-report in SQL Server Reporting Services (SSRS). SSRS is a part of Microsoft SQL Server services, including SSAS (SQL Server Analysis Services) and SSIS (SQL Serv
  • Synonyms in SQL Server

    This article explains synonyms in SQL Server. SQL Server Synonyms are created in the database that need to access the other database and use them in the SELECT statement, like we access the table in t
  • After Trigger vs Instead of Trigger in SQL Server

    This article explains the After Trigger and Instead of Trigger using an example and the differences between them.
  • SQL Server Vulnerability Assessment

    SQL Server Vulnerability Assessment (VA) in SQL Server Management Studio 17.4 or later lets SQL Server scan your databases for potential security vulnerabilities and can be run against SQL Server 2012
  • Temporary Tables in SQL Server 2012

    In this article, I am going to give a quick overview of temporary tables in SQL Server 2012. local temporary table, global temporary table, drop temporary table.
  • SQL Data Discovery And Classification In SSMS

    Data exploration and documentation can be cumbersome, classifying data can be one of those tedious but necessary things. With the introduction of such things as GDPR there is an ever greater need to c
  • Replace Nulls With Specified Values in SQL Server

    In this article we will see the various ways to replace null values in a table. ISNULL() function, CASE statement, COALESCE() function can be used to replace null values in a SQL Server table.
  • Difference Between Char, Nchar, Varchar and Nvarchar Data Types in SQL Server

    This small article is intended for the audience stuck in their interview when asked for the differences among CHAR, VARCHAR, NCHAR and NVARCHAR data types. CHAR vs VARCHAR, NCHAR vs NVARCHAR, differen
  • Understanding Transactions in SQL Server

    This article covers the fundamentals of transactions in T-SQL, from concepts such as understanding what SQL transactions are, to ACID properties, local and distributed transactions, guidelines for wri
  • New Resumable Online Index Create SQL Server 2019

    SQL Server 2019 brings a very exciting new feature that is long overdue. Resumable Online Index Create is one of my favorite new things. This, paired with the Resumable Index Rebuilds introduced with
  • User Defined Table Types And Table Valued Parameters

    In this article you will learn about User Defined Table Types and Table-Valued Parameters. The concepts of User-Defined Table Types (UDTTs) and Table-Valued Parameters (TVPs) were introduced in SQL Se
  • 50 Important Queries In SQL Server

    In this article you will learn about 50 Important Queries in SQL Server. EXEC sp_helpdb, exec sp_helptext, EXEC sp_updatestats, EXEC sp_MSforeachtable, SQL query for version name of SQL Server, Enable
  • SQL Server ISNULL() With Multi Column Names

    Many times we come across null values within tables in SQL Server. Null values are the values with no data; that means the data is missing or unknown. In this article, initially we will understand the
  • Maximum Limit Value For Integer Data Type in SQL Server 2012

    In this article, I described how to calculate the maximum range of various integer data types in SQL Server. TINYINT, SMALLINT, INT and BIGINT are all number data types. The difference between these d
  • 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. Difference between Primary key and Unique key.
  • Diving Into The Basics of SQL Server

    To learn the database, most of the times, we need to build the schema and put some data inside. But to speed up the learning and make the hands dirty in code as soon as possible, large organizations p
  • Merging Data Using A Queuing Pattern

    In my recent article Using Materialized Views Effectively, I offered a few ways to populate data stores that can be critical performance-improvers for your apps and BI environments that use SQL Server
  • How To Rebuild Master Database In SQL Server Without Backup

    Here, we will discuss the full procedure to rebuild Master Database in SQL Server without unavailability of backup. Read the complete blog very carefully to get appropriate results.