All articles: Data Query Language (DQL)

Checkout our self-help content, created by our top Experts!
Boolan Data Type in SQL Server – Querychat
The boolean data type is an important data type within SQL. It allows us to create a field or column that can store only two predefined values: true or false. This article elaborates on how SQL server boolean data type is defined and set in SQL Server. SQL Server stores...
Using OPENXML to Shred XML Data – Querychat
The SQL Server OPENXML is a classic function that allows us to query XML data into a tabular format. The process is essentially called "shredding XML." In this article, we will look at how to use this function to shred XML data. Many legacy applications use OPENXML to shred XML...
Calculating the Standard Deviation in SQL – Querychat
The standard deviation is a statistical measure that tells us how distributed a group of values is. In SQL, the STDEV function is used to calculate the standard deviation for a specified expression or field. In this article, we will learn how to use STDEV in SQL, both as an...
Extracting date and time components in MySQL – Querychat
MySQL has several native functions that allow us to extract different date and time components from a DATE, DATETIME, or TIMESTAMP field. Let's see a list of these functions and how they work. Common Functions in MySQL for Date and Time fields CURRENT_DATE() CURRENT_TIME() CURRENT_TIMESTAMP() DATE() DAY() DAYNAME() DAYOFWEEK() DAYOFYEAR()...
Correlated vs. Uncorrelated Subqueries – Querychat
Subqueries can be categorized as correlated subqueries and uncorrelated subqueries, based on how the inner query is parsed. This article discusses these two types of subqueries, including performance considerations for correlated subqueries. Let’s discuss each of them in more detail. It might be a bit confusing at first on the...
4 Places We Can Use Subqueries in SELECT Statements – Querychat
When using a subquery in the SELECT statement, we can apply it in these clauses: SELECT, FROM, WHERE, and HAVING. In this article, we will see examples of using subqueries in these four places. All examples provided in this article use Employee and Department tables described in Table 1 and...
MySQL Comparison Operators: Greater Than And Less Than – Querychat
In this article, we will learn the MySQL less than and greater than operators. These comparison operators are mainly to select, update and delete data from tables, to compare data and here we will look at the examples. Basic rules of comparison The result of the comparison can be TRUE...
What is Inline View in SQL – Querychat
In this article, we will learn what inline view in SQL is, what it can be used for, and where it can be actually used. What is more, we will look at the illustrative examples of the inline view use. The definition of the inline view in SQL The inline...
SQL Server output clause – Querychat
The SQL Server output clause returns the values of each row that was affected by an Insert, Update, Delete, or Merge statements. The output from an output clause can be returned as a data set, inserted into a table or table variable. A database model often includes tables with autogenerated...
How to use SQL Server STUFF function – Querychat
In this article, we will learn how to use the STUFF function in SQL Server. We will see how it works, what its parameters are, and we will also build some examples to familiarize ourselves with its use. STUFF function in SQL Server The STUFF function is a bit peculiar....
1 2 22 23