All articles: Data Query Language (DQL)

Checkout our self-help content, created by our top Experts!
All articles Data Query Language (DQL)
Access VBA: How to Create a Query Programmatically – Querychat
In the Microsoft Access database, there are several ways we can choose to create a new query. Besides we can create it from Design View or SQL View, we can also create it programmatically using VBA code. This article shows how to do it.  To create a new query programmatically,...
MySQL safe update mode – Querychat
In this article, we will learn how to use the safe update mode and how to activate it in Workbench. What is the safe update mode? It is an option that does not allow executing UPDATE or DELETE statements without a WHERE clause. Its main objective is to avoid deleting...
How to use JOINS in MongoDB – Querychat
In this article, we will learn what is MongoDB, what is the replacement of the JOIN operator in MongoDB and how to use it. What is MongoDB In a nutshell, MongoDB is a high-performance, document-oriented database without any data schemas that belongs to non-relational databases. It contains many collections, they...
How can we use regular expression in SQLite – Querychat
In this article, we will learn how to use regular expressions in the queries we build on SQLite.  Regular expressions allow us to filter the rows that comply with a determined pattern that we define. For example, let's imagine we have an Employee table. With regular expressions, we could filter...
How to reproduce and correct MySQL error 1093 and MySQL error 1215 – Querychat
In this article, we will see how to reproduce and correct the MySQL error 1093 and MySQL error 1215. We will build the examples on an Orders table with the following structure and data: CREATE TABLE `orders` (   `id` int(11) NOT NULL,   `client_id` int(11) NOT NULL,   `received`...
MS Access convert text to number – Querychat
In this article, we will learn how to convert text to number with MS Access CSng function. First, let's create a Products table, where we will execute our queries. The Products table will have the following structure and content: CREATE TABLE `products` (   `ID` integer NOT NULL,   `Name`...
How to work with MySQL Least and MySQL Greatest – Querychat
In this article, we will learn how to work with MySQL Least and MySQL Greatest functions. We will use MySQL version 8.0 to build the sample queries presented in this article. MySQL Least function It was introduced in MySQL version 4.0.This function is used to find the lowest value among...
SELECT TOP WITH TIES (T-SQL) – Querychat
This article explains the additional WITH TIES option used in the TOP clause in SQL Server. The TOP clause specifies the first n rows of the query result that are to be retrieved. When we specify this option, additional rows that match the values in the last row will be...
Create Synonym in SQL Server – Querychat
Synonyms in SQL Server are simple database objects which acts as an alternate name for other database objects like stored procedures, views, tables etc. Synonyms became available  in SQL Server from the SQL Server 2005 and above. The purpose synonym in SQL Server is to provide an alternate name for...
Get current date in SQL – Querychat
In SQL, there is a possibility to get the current date from the system by using an SQL function. This date is also known as system date and, except providing the date, the function returns the time as well. Unlike many other functions, MS SQL Server, MYSQL and Oracle use...
1 2 13 14