All articles: Data Query Language (DQL)

Checkout our self-help content, created by our top Experts!
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....
Self JOIN in SQL – Querychat
In this article, we are going to learn about self join in SQL. We will see why we need Self joined tables and how to create them. This article includes examples that can be executed in both SQL Server & MySQL. Self Join Tables When a table is joined with...
MySQL select all columns from one table – Querychat
In this article, we will learn how to select all the columns from a table in MySQL through practical examples. To retrieve all columns, we can list all column names or use a wildcard in the query. Also, we will take a look at how to select all columns except...
How to work with MySQL Substring function – Querychat
In this article, we will learn how to use the SUBSTRING function in MySQL through a couple of examples. SUBSTRING function in MySQL The SUBSTRING function allows us to extract a section or part of the main string. Syntax The SUBSTRING function receives 3 parameters: the original string, the starting...
How to add comments in SQL Server – Querychat
In this article, we will learn how to comment on SQL Server. We will see how to comment on a single line and a block of code. We will add comments to a query and a script. SQL script comment In our first example, we are going to comment on...
How to change the date format in SQL Server – Querychat
In this article, we will learn how to change the presentation format of dates in SQL Server using the Convert function.  Convert function in SQL Server Convert function allows us to transform values of any type to a certain type of data, with a specific format that can be indicated...
Counting in SQL – Querychat
Everybody knows how to count in SQL, right? It is as simple as using count(<something>), the first aggregate function we have ever learned. It seems that the only concern with the count aggregate function is what is the difference between count(*) and count(1).  Before answering that question and a few...
List Databases in Oracle – Querychat
In Oracle, the v$database and dba_users views can be used to get a list of the databases and schemas within an Oracle server. As a database administrator (DBA), we often use these views to get information on all databases. This article shows us the different ways to list all databases...
1 2 22 23