Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / database / SQL-Server

SQL-Server

SQL-Server

Great Reads

by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.
by Paul Rony
Programmer's Guide to Starting a Software Company and Building an Enterprise Application
by #realJSOP
You can also enclose your column name in brackets, like so: [Create Date]

Latest Articles

by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.
by Paul Rony
Programmer's Guide to Starting a Software Company and Building an Enterprise Application
by #realJSOP
You can also enclose your column name in brackets, like so: [Create Date]

All Articles

Sort by Score

SQL-Server 

by Rick Bassham
How to use the SqlChangeMonitor with the new MemoryCache class in .NET 4.0.
by David Truxall
How to fic this error, in Windows Phone 7.
by Jin Vincent Necesario
This article shows you the basics of SQL Schema using the DDL statements.
by Rajat-Indiandotnet
As a product owner, you always worried about the different security aspects of your application and SQL Server Database is one of the main important parts for which you might worry.
by Amogh Natu
This post shows how to insert a comma-separated string into multiple rows in a table in SQL Server.
by mazhou
Ad-hoc pagination support with SQL Server codenamed “Denali”
by Manjuke Fernando
Always encrypted feature in SQL Server 2016
by Mel Padden
A script that analyzes the text of each individual object and builds a tree of what depends on what.
by Raymund Macaalay
If you want to audit what's happening on your SQL Server, then look no further. SQL Server 2008 has a built in function for that...
by Tejas Vaishnav
Auto incremented ID using VARCHAR data type
by Vivek Johari
Creating an Azure SQL Database Contents Introduction Creation of Azure SQL Database Step 1: Select Database Name Step 2: Select Azure Subscription Step 3: Choose Resource Group Step 4: Choose Database Source Step 5: Choose SQL Server Step 6: Choose Elastic Pool Option Step 7: Choose Service Tier for
by Sacha Barber
A while back I posted a blog post about a simple Circular Progress Bar that I did for WPF.
by Paul S. Chapman
How to improve the creation of XML message requests using Reflection, XML and XSLT
by JasonShort
Plugins are used in data applications to support more than one provider from a single codebase. The Provider Factories in ADO.NET is one such example, but you cannot work with the provider specific features when you use these factories since they only implement generic ADO.NET functions.
by essentialSQL
Basic concepts of built-In functions in SQL Server
by Rui Jarimba
This is the first of a two part series about how to perform bulk inserts in your .NET applications, using a SQL Server database.
by Rob Kraft
The benefit of this approach is that you can then regularly scan your entire code base for the use of .ExecuteReader and .ExecuteNonQuery knowing that there should be no cases of those methods, other than the exception cases you expect.
by Anton Burtsev
A few months ago, I had to optimize web portal (classified ad). The portal was built on ASP.NET 1.1. It seemed that portal had two main problems. Here is how I solved them.
by Neeraj Kaushik1980
Following are the step by step instructions to enable and use the change tracking feature in SQL Server.
by skydger
Checking MS SQL Server database files default paths.
by Ivan Krivyakov
Christmas Carol: XML Signatures
by essentialSQL
Examples of common data types in SQL Server and how to define them
by essentialSQL
Commonly used SQL Server data types
by Ben Liebert
Comparing the performance of AppFabric against SQL Server
by Manjuke Fernando
Computed columns in SQL Server
by David Truxall
Configuring CRM 4.0 for SSRS Without the Data Connector
by Afzaal Ahmad Zeeshan
Overview of SQL Server on Linux
by User 6619207
How to copy a table using SQL Server Management Objects
by Tharaka MTR
How to count consecutive dates using SQL
by Kevin Chadney
Creating a simple SSMS extension which accesses the query window and object browser.
by Nadege Rouelle
How to create a database project with Visual Studio
by Mohammad Elsheimy
Give the user the flexibility to design his sheet, report, bill, invoice, whatever.
by Z Kavtaskin
How to create a Custom Key Store Provider for SQL Always Encrypted (Without Key Vault Example PoC)
by essentialSQL
Introduction to cross join - create row combinations
by Rohitmssqlfun
The 8th cumulative update release for SQL Server 2008 R2 Service Pack 2 is now available for download at the Microsoft Support site.
by Rohitmssqlfun
Cumulative Update – 9 for SQL Server 2008 R2 Service Pack 2 Is Now Available!
by MJ Ferdous
Data Import from Excel File and building an Automated Insert Script to Export into Excel File or to Export into SQL Server Table
by Rohitmssqlfun
Data purity issue after upgrading SQL 2000 to later versions
by Andrew Zwicker
A continuation of the data dictionary discussion with information about how the documentation is done
by Andrew Zwicker
Why table and column documentation is useful and some SQL for setting up the data dictionary tables
by DotNetLead.com
Deploy existing ASP.NET Core UI, API, and SQL Server to Docker containers
by Vivek Johari
Basic information about the different ways of creating a table
by Rohitmssqlfun
This DMV allows you to discover a lot of very interesting and important performance information about your cached stored procedures.
by Martin Hinshelwood
From time to time your website structure may change. When this happens you do not want to have to start from scratch with your Google rankings, so you need to map all of your Old URLs to new ones.
by Manjuke Fernando
DROP IF EXISTS in SQL Server 2016 (DIE)
by Raymund Macaalay
The easiest way to cancel all SharePoint workflows in progress
by Patrick Cunningham
This article uses 8 steps to create example of how to read and write from HTML to a SQL database in a .NET web application using jQuery, JSON, and XML.
by Raymund Macaalay
How to change collation of all database objects in SQL Server
by vinothharshad
Except vs Not In in SQL Server
by Rui Inacio
Fixing the SSDT unresolved reference to object error
by Tharaka MTR
Generate insert statements from a specific table data using SQL Server
by Sadeque Sharif
Generate script from Microsoft SQL Server Management Studio.
by PeteBarber
How to generate a SQL Server CE database schema from a SQL Server database using Entity Framework
by Mayur V Lohite
Generic Repository Pattern MVC
by essentialSQL
This is the second in a series of articles about subqueries. In this article, we discuss subqueries in the SELECT statement’s column list. Other articles discuss their uses in other clauses.
by essentialSQL
Introduction to Inner Joins in SQL Server
by essentialSQL
Introduction to Outer Joins in SQL Server
by essentialSQL
Grouping results returned from your queries using the GROUP BY clause
by essentialSQL
Simplified Data Modeling in SQL
by Kevin Mack
Few ideas for strengthening micro-services architectures
by MBigglesworth79
SELECT @Variable vs SET @Variable in SQL-Server
by Johan Ohlin
Group concatenation in T-SQL using CTE.
by essentialSQL
How to combine results from more than one table
by essentialSQL
In this video, we'll walk you through how to use the LIKE clause.
by Rajat-Indiandotnet
How to easily unpivot pivot data in SQL Server
by zidane168
Use SQL triggers to keep track of the changes made to your data
by Raymund Macaalay
This post will show you how to archive SharePoint List Items to SQL Server
by Rui Inacio
To bulk insert efficiently, the SqlBulkCopy class must be used.
by Afzaal Ahmad Zeeshan
An overview for connecting an ASP.NET website or a web application to a remote SQL Server database
by Vivek Johari
This article will try to show how to find duplicate values in a table.
by Tharaka MTR
This post will show you how to fix orphaned SQL users.
by rusanu
How to Multicast messages with SQL Server Service Broker
by rusanu
How to pass a NULL value in a message to a queue in SQL Server
by Nitesh Kejriwal
How to retrieve the size of data files of all databases present in SQL Server and the actual amount used in these files.
by Nadeem Afana
Illustrates an efficient method of returning random rows from a SQL Server database
by Rohitmssqlfun
This post discusses how to save deadlock graph events as .xdl file in SQL Server.
by Ghanshyam N Patel
How to shrink SQL Server database log file
by Shahriar Iqbal Chowdhury/Galib
This post shows you how to solve SSIS Error Code 0xC020801C/0xC004700C/0xC0047017
by atverma
In this article I’ll discuss about unit testing SQL Server 2008 Database project using Visual Studio 2010.
by atverma
In this article I will explore the important features that can be configured to build comprehensive database unit tests.
by atverma
This is the last article of the series “How to unit test SQL Server 2008 database using Visual Studio 2010”.
by rusanu
A technique to make tables with columnstore indexes updateable
by rusanu
A very simplified explanation of how column store indexes can be used
by Johan Ohlin
How to use recursive CTE calls in T-SQL.
by Dave C Andrews
Use ROW_NUMBER() to enumerate and partition records in SQL Server
by Betclic Tech
How we improved database code quality
by Vivek Johari
Identity property in SQL Server
by raju melveetilpurayil
Explaining how to store,display, create thumbnails and add watermark on image
by Duy H. Thai
Some frequently-used methods for image handling in .NET
by Manjuke Fernando
What is the difference between Index REBUILD and REORGANIZE and when exactly should you use it
by Mithun Pattankar
Step by step process of installation of SQL Server Express 2014 on Windows 10
by Manjuke Fernando
How to install SQL Server Data Tools
by essentialSQL
Introduction to SQL Server Data Modification statements
by Vivek Johari
Introduction to SQL Server Views
by essentialSQL
Introduction to SQL Server's built-in conversion functions
by essentialSQL
Introduction to SQL Server's built-in logical functions
by essentialSQL
Introduction to SQL Server’s Common String Functions
by Manjuke Fernando
Briefly describing the features in SQL Server Data Tools.
by essentialSQL
Benefits of stored procedures and how to create and execute them
by Kunal Chowdhury «IN»
Join Hint in SQL - Guest post by Joydeep Das
by Sibeesh Passion
Some shortcuts that may be useful to you when you work with SQL Server Management Studio
by essentialSQL
In this blog post, you will learn about stored procedures
by essentialSQL
In this puzzle, we’re going to learn how to find the person whose birthday, among others, is in the middle.
by essentialSQL
How to join dirty data using SQL Server
by essentialSQL
How to use SQL Server Date functions
by essentialSQL
In this puzzle, we’re going to learn how to query the data dictionary using SQL Server.
by Sibeesh Passion
How to load an XML file and show as li using ng-repeat in Angular JS
by Jameson Triplett
Log4j2.xml Tweaks
by Raymund Macaalay
How to make the best use of the SQL Server Maintenance Plans
by Debopam Pal
Using Microsoft.Office.Interop.Excel library, you can bring your data from your database against LINQ query and store them into an Excel Sheet.
by Vivek Johari
This article explain key concepts and best practices related to NULL value in SQL which help in mastering the NULL value in SQL Server.. The post Mastering NULL value in SQL Server appeared first on Technology with Vivek Johari..
by Nitin Singh India
Merge data in SQL Server.
by PratapReddyP
Many a times we came across situation to merge records between two tables.
by Basavaraj P Biradar
The new Merge statement in SQL Server 2008.
by Kelum W. Ganegoda
Microsoft SQL Server Backups & Restore: Steps Explained
by Vivek Johari
Migrating SQL Database To Azure SQL Instance using Microsoft Database Migration Assistant (DMA) Tool Contents Introduction Microsoft Database Migration Assistant (DMA) tool Migrate SQL Server database To Azure SQL Instance using DMA tool Detecting the compatibility issues using Assessment Type
by Shameel
This multi-part article series discuss migrating your databases, applications and services from SQL Server to PostgreSQL and discusses all the important information you need to be aware of, before beginning a migration project..
by Shameel
Part 2 of this multi-part article series compares SQL Server and PostgreSQL article, database structure, language differences, data type mappings, functions and operators and other important considerations for migration..
by Shameel
Part 3 of this multi-part article series discusses the actual migration process: Schema and data migration, ETL/ELT, Reporting & OLAP, Scheduling and Applications & Services migration.. The post Migrating your SQL Server Workloads to PostgreSQL – Part 3 appeared first on The Developer Space..
by Shameel
Part 4 of this multi-part article series discusses Maintenance and Monitoring, High Availability, Load Balancing, and Replication and Environment Stabilization.. The post Migrating your SQL Server Workloads to PostgreSQL – Part 4 appeared first on The Developer Space..
by Rui Inacio
Migration from SQL Server 2008 to 2012
by Raymund Macaalay
Easy and simple 11 steps to start mirrored SQL Server
by Mahmudul Haque Azad
A simple trick to add to custom node to the XML commenting.in GhostDoc
by Andrei Ion Rînea
Simpler paging, sequences and FileTables in SQL Server 2012
by yuanfeng.ma
Availability groups (AG) is used for (remote) disaster recovery
by essentialSQL
In this article, we explore non recursive CTEs (Common Table Expressions). This is a broad class, and basically covers every form of CTEs except those that call themselves. This other class is called the recursive CTEs; they are covered in the next article.
by rusanu
Adding a new non-NULLable column with default values to an existing table in SQL Server 11
by snorkie
Oracle tables have no built-in mechanism for auto numbering. Instead, you must create a separate unique Sequence object and use it each time a record is inserted into the database.
by Shameel
This article walks you through the summary of most important new features. enhancements and breaking changes in PostgreSQL 12.. The post PostgreSQL 12: New Features and Enhancements appeared first on The Developer Space..
by Shameel
This article describes the new Stored Procedure feature in PostgreSQL 11.5 and shows you how it differs from Functions.. The post PostgreSQL finally gets Stored Procedures appeared first on The Developer Space..
by Steve Psaltis
Extract variables from a persisted workflow to debug an issue or to verify your persistence
by Bob McGowan
Processing SQL Server FILESTREAM Data - Part 1
by Bob McGowan
In this final installment, we'll finally see some C# code that I used to read and write the FILESTREAM data.
by Bob McGowan
Utilizing SQL Server FILESTREAM capabilities from .NET
by Bob McGowan
Utilizing SQL Server FILESTREAM capabilities from .NET
by Mohammad Elsheimy
Programmatically Enumerating, Attaching, and Detaching SQL Server Databases via SQL statements and stored procedures
by johnniealan
This article describes about adding progress bar in cell.
by Rui Inacio
This article explains the main concepts involved and then the possible options to Clean the SQL Server Cache.
by Martin Thwaites
If you have an issue with a slow part of a site after a large dataload, that you can't replicate after a DB restore, it's likely you could be dealing with a similar issue.
by essentialSQL
Query plans in SQL
by Andrei Ion Rînea
Some performance tips
by Jeremy Hutchinson
Update table rows with varying random values in SQL
by Pranay Rana
Understanding Descendants and avoiding misconception with this method
by Manjuke Fernando
How to repeat a SQL row based on a value in a different column
by jgauffin
Griffin DAL Generator – Take 2
by Bryan O'Connell
Review of the ebook: Brad's Sure Guide to SQL Server Maintenance Plans.
by Gil Fink
Revisiting XML Configurations In Unity In the past I wrote a few tutorials about Unity application block. One of the things I wrote about was how to configure a Unity container using design time configuration.
by Steve Maier
The same database and the same RIA Services can be used as a Web Service by using some simple additions to the setup of your project.
by Rajat-Indiandotnet
Row Level security SQL Server 2016
by SonuKSingh
SQL Server: Track which rows have been modified
by Rick Bassham
A simple console application to convert the fixed-width output from the "Output to File" option in SQL Server Management Studio to a CSV file
by Manjuke Fernando
How to save an image to a SQL Server table
by Sacha Barber
So last time we looked at how to use Slick to connect to a SQL server database. This time we look at how to use one of the 2 popular Scala testing frameworks.
by outcoldman
Schedule a daily backup with SQL Server Express
by Vivek Johari
This article explained about measures for securing data in SQL Server at various levels to protect data from unauthorized access and breaches.. The post Securing data in SQL Server appeared first on Technology with Vivek Johari..
by MBigglesworth79
XML Serialization
by Gediminas Geigalas
Learn how to serialize System.DateTime for use in SQL Server stored procedures
by Manas Bhardwaj
This post is intended to be used as a hack for developers to release some disk space. Please do not use on actual production environments.
by Rion Williams
Smooth transactions with TransactionScope
by Shahriar Iqbal Chowdhury/Galib
Solution to the MSSQL Server “Suspect”
by Nitesh Kejriwal
The WITH MOVE clause can be used to relocate one or more files
by Dinesh K Mandal
Some Hidden Facts about Stored Procedure and Its Optimization
by essentialSQL
SQL COALESCE Function and NULL
by essentialSQL
SQL COALESCE function and how you can test for null, and when present, substitute it for another value
by essentialSQL
SQL DISTINCT Clause For SQL Server
by essentialSQL
Understanding SQL full outer join and its reconstruction through other join clauses
by pinaldave
SQL SERVER – 2012 – Summary of All the Analytic Functions – MSDN and SQLAuthority
by pinaldave
Swap Value of Column Without Case Statement in SQL Server
by pinaldave
SQL SERVER – Database Properties – Number of Users
by Vivek Johari
Stored Procedure in SQL Server can be defined as the set of logically group of SQL statement which are grouped to perform a specific task. This article will describe the Stored Procedure in SQL Server and their benefits.
by pinaldave
Primary Key and non-clustered index in simple words
by pinaldave
SQL Server – Puzzle – Statistics are not Updated but are Created Once
by pinaldave
SQL Server - SmallDateTime and Precision - a continuous confusion
by pinaldave
Tips from the SQL Joes 2 Pros Development Series – Efficient Query Writing Strategy
by pinaldave
SQL SERVER – Tips from the SQL Joes 2 Pros Development Series
by pinaldave
Tips from the SQL Joes 2 Pros Development Series – System and Time Data Types
by Nuno M. F. Gomes
I'm not an every day SQL Server user but I use SQL Server regularly since 7.0 version until the 2005 version (not yet tried 2008 in a serious way) and from time to time I still find some nice hidden gems.A few days ago I needed to created a cleanup script for an application and one of the t
by Arun Ramachandran India
What exactly are UNION and UNION ALL in SQL Server
by puri keemti
SQL Server 2005
by Martin Thwaites
SQL Server and duplicate indexes
by Martin Thwaites
Finding and removing indexes in SQL Server is an excellent way to remove bottlenecks, especially if you've "inherited" the application.
by essentialSQL
SQL set operations
by Rohitmssqlfun
SQL Server discovery report
by essentialSQL
SQL Server Hierarchical Query using the hierarchyid type
by Markus Greuel
Some tips for developers who have to deal with a slow SQL server.
by Rohitmssqlfun
SQL Server Silent unattended installation using configuration file
by rusanu
SQL Server table columns under the hood
by aasim abdullah
SQL Server: A Query Slow in SSMS, Fast in Application, WHY?
by aasim abdullah
How to apply filter on sp_MSforeachDB
by aasim abdullah
How to control SQL Server Log Information
by aasim abdullah
Using logon trigger, users from valid IP addresses can be restricted, but what if you forgot to add in safe list. You will be unable to login though you have sysadmin rights. Use DAC to disable logon trigger.
by aasim abdullah
How local variables can reduce query performance in SQL Server
by aasim abdullah
In SQL Server 2005, there is no way to find out WHO AND WHEN someone changed the compatibility level of a database. Here is a trick for this functionality.
by aasim abdullah
To find out whose birthday is coming in a given number of days is very simple.
by aasim abdullah
SQL Server: Script to generate HTML Report/mail for Databases Current Size, Growth Rate and Available Disk Space
by Justin Cooney
How to search Stored Procedure create/modify date or text using TSQL
by aasim abdullah
A simple way to swap column values.
by aasim abdullah
Smarter Way of Query Load Testing at Testing Server
by aasim abdullah
Three common DDL change log methods for SQL Server.
by aasim abdullah
Why we should avoid the NOLOCK table Hint in DELETE/UPDATE queries.
by Steve Naidamast
SQL Server's LocalDB database engine
by Rob Kraft
SQL Server’s sp_executesql does not protect you from SQL Injection
by essentialSQL
Truncate and Delete in SQL
by Madhur Kapoor
In this post, we will look at how to save images in SQL server.
by My Tech World
It is recommended that stored procedures shouldn't be prefixed with sp_ for two simple reasons.
by Gediminas Geigalas
This article reviews how my opinion on Stored Procedures changed over time and what disadvantages they bring into your application.
by Wendelius
System.IO.Packaging namespace in WindowsBase may cause problems when trying to create a CLR procedure.
by Andrew Zwicker
A discussion of how a separate database is used for storing table backups.
by Anton Angelov
Tutorial how to create test cases statistics for the automation status and their distribution by priority. Steps how to setup SSRS and TFS Data Warehose.
by Thomas Weller
Testing Entity Framework applications - Part 1
by Rion Williams
Bug stories: Exposition, action, climax, resolution, or epic failures.
by Melick
How to copy your production SharePoint database to development environment
by mazhou
The SEQUENCE Object in SQL Server codenamed “Denali”
by Leland Richardson
Several little-known SQL tricks/techniques used to improve query times and enforce business rules with common everyday web-development scenarios
by Bryan Thomas Weikel
CodeProject"LEK" is a three-tier .NET WinForms accounting application that can be configured at run time to use either LINQ to SQL, Entity Framework or NHibernate to access data in either a "main" or "testing" SQL Server database.
by Raymund Macaalay
How to transfer users from one SQL Server to another including SID's the easy way
by Shahriar Iqbal Chowdhury/Galib
TSQL Recursive Split function
by Shahriar Iqbal Chowdhury/Galib
TSQL split a string by delimiter
by essentialSQL
Uncommon SQL server data types
by Vivek Johari
In SQL Server, Change Data Capture (CDC) is a powerful feature that tracks changes (inserts, updates, and deletes) made to. The post Understanding CDC in SQL Server appeared first on Technology with Vivek Johari..
by rusanu
This article will help you write better database code and will help you get started when you have to investigate performance problems.
by Manjuke Fernando
It's very important to know what sort of JOINs are available in SQL Server and where exactly we can use them, in order to produce accurate results.
by Kelum W. Ganegoda
This post demonstrates how to create an update progress with the UpdatePanel, similar to the one we can see in GMail.
by Afzaal Ahmad Zeeshan
Uploading the files - HTML5 and jQuery way
by Rob Kraft
Use a SQL script to generate well formatted stored procedures in SQL Server
by essentialSQL
In this puzzle, we’re going to learn how to create a cross tab query using SQL Server.
by essentialSQL
How to calculate the median value using SQL
by Raymund Macaalay
If you want an easy way of viewing objects in Active Directory, one good way of doing it is creating a view or stored procedure on SQL Server.
by essentialSQL
In this puzzle, we’re going to learn how to work with the AdventureWorks Bill of Materials table.  Companies use a BOM (Bill of Materials) to itemize the products that are used or contained in another product. Solving puzzles is a great way to learn SQL.
by Andrew Zwicker
A discussion why having a staging environment with data that mirrors production is vital to tracking down issues.
by Steve Naidamast
How to use Black Falcon software's SQL Server source control for developers
by OwenDavies
This post outlines how to use Docker image for local SQL Server development.
by Andrew Zwicker
A discussion about nightly populated tables and how they have reduced SQL Server load
by Manjuke Fernando
How to use the new MERGE statement feature in SQL Server 2008
by Sky Sanders
A strategy for implementing maintaining separation of concerns and implementation hiding.
by derekman9707
Different types of database backups
by essentialSQL
This post discusses the major parts of a SQL database
by User 6619207
About SQL Server Management Objects
by essentialSQL
What is a Database Trigger?
by essentialSQL
In this puzzle, we’re going to learn how to create a dynamic pivot table using SQL Server.
by essentialSQL
What is a Data Dictionary in SQL Server?
by Shivprasad koirala
BI Semantic Model (BISM) in SQL Server 2012
by essentialSQL
Difference between WHERE and HAVING clauses
by Rion Williams
Troubleshooting SQL performance: identifying issues, optimizing queries, utilizing tools efficiently
by Gaston Verelst
Why you would use Common Table Expressions
by Mohammad Elsheimy
Binary Large Objects (BLOBs) are pieces of data that have -usually- exceptionally large size (such as pictures or audio tracks).
by Ivan Krivyakov
Attribute order should not matter in XAML, but sometimes it does...
by AlexTatiyants
JSON-oriented document stores like Mongo and Couch have really become the darlings of the web application crowd. Of course, JSON (or BSON) isn't the only game in town. When it comes to document store formats, the other white meat if you will is XML.
by Keyhole Software
XML Manipulation With XML Copy Editor