Form to XML

XQuery examples to delete SQL XML documents

February 5, 2020 by

Delete operations over SQL XML should be possible with either erasing the XML document with the XML data type column or delete XML tag or attribute in the XML document using XQuery. The utilization of the XML data type with XQuery is tricky and significant in SQL Server.

Learn SQL: How to Write a Complex SELECT Query

February 4, 2020 by

In my career, I’ve heard many times, things like “How to write a complex SELECT query?”, “Where to start from?” or “This query looks so complex. How you’ve learned to write such complex queries?”. While I would like to think of myself as of a brilliant mind or genius or add something like “query magician” […]

Converting commas or other delimiters to a Table or List in SQL Server using T-SQL

January 31, 2020 by

Database developers often need to convert a comma-separated value or other delimited items into a tabular format. Delimiters include pipe “|”, hash “#”, dollar “$” and other characters. SQL Server compatibility level 130, and subsequent versions, support a string_split() function to convert delimiter-separated values to rows (table format). For compatibility levels under 130, developers have […]

Introduction to the XML data type in SQL Server

January 30, 2020 by

The XML data type is a very common data type that is used to store unstructured or heterogeneous data in SQL Server. In this article, we will discuss the use of the XML data type along with its benefits, disadvantages, and limitations within various use cases.

The trend which proves the SQL is third top used tool

Introduction to SQL

January 29, 2020 by

Today, data is the basis of any business. The world of enterprise computing is the epitome of data-driven businesses. The importance of structured storage of data is unquestionably in the focus. And at this time, with the computing model quickly shifting towards the cloud, and storage costs falling rapidly, enterprises are leveraging data more and […]

aggregate functions - the data model we'll use

Learn SQL: Aggregate Functions

January 28, 2020 by

SQL has many cool features and aggregate functions are definitely one of these features, actually functions. While they are not specific to SQL, they are used often. They are part of the SELECT statement, and this allows us to have all benefits of SELECT (joining tables, filtering only rows and columns we need), combined with […]

Database Collation

SQL Server collation introduction with collate SQL casting

January 27, 2020 by

SQL Server collation refers to a set of character and character encoding rules, and influences how information is stored according to the order in the data page, how data is matched by comparing two columns, and how information is arranged in the T-SQL query statement. Collate SQL follows rules applied on a table when Select, […]

join multiple tables - tables needed

Learn SQL: Join multiple tables

January 27, 2020 by

If you want to get something meaningful out of data, you’ll almost always need to join multiple tables. In this article, we’ll show how to do that using different types of joins. To achieve that, we’ll combine INNER JOINs and LEFT JOINs. So, let’s start.

Edit XML Document

Different ways to update XML using XQuery in SQL Server

January 23, 2020 by

XQuery is a query language for XML. XML is a markup language that provides software and hardware-independent way of storing, transporting, and sharing data. In this case, XML documents are stored in a SQL Server database. XQuery is used to manipulate, find and extract information stored in the XML format. It’s analogous to SQL for […]

SQL - types of relations

Learn SQL: Types of relations

January 22, 2020 by

One of the most important things in databases is to understand the types of relations in the databases. That stands for both – a process of designing a database model as well as when you’re analyzing your data. Understanding these relations is somehow natural and not so complex but is still essential in the database […]

Learn SQL: SQL Scripts

January 21, 2020 by

I can hardly imagine making any complex database changes without using SQL scripts. We actually used them in this series so far, but we haven’t pointed out what they actually are. Today we’ll stand up against that injustice. Sit back, relax, and get ready to learn something new and useful.

Query SQL03 to verify the data

Configuring SQL Server Express edition as SQL witness server in Database Mirroring

January 20, 2020 by

In this article, I am going to explain how we can use the SQL Server Express edition for the SQL witness server of the database mirroring setup. Database mirroring is a cost-effective and easy to configure high availability solution. Unfortunately, this feature has been deprecated, but still, some organizations use database mirroring as a high […]

Learn SQL: INNER JOIN vs LEFT JOIN

January 16, 2020 by

INNER JOIN vs LEFT JOIN, that is the question. Today, we’ll briefly explain how both of these two join types are used and what is the difference. We’ll go through this topic again later when we’ll expand our model and be able to write much more complex queries.