All articles: Data Query Language (DQL)

Checkout our self-help content, created by our top Experts!
MySQL SELECT TOP, LIMIT, ROWNUM – QueryChat
To restrict the number of rows returned from a query, we use “LIMIT” clause in MySQL. In this article, we will look at various examples to explore the use cases of  “LIMIT” clause. Please note that in MySQL, “TOP” clause is not defined and its functionalities are replaced by “LIMIT”...
MySQL not equal to operator – Querychat
In MySQL, not equal to (<>, !=) is one of the MySQL comparison operators (=, >, <, >=, <=,<>) used for inequality test between two operands of compatible types. In this article, we will cover a few use cases of the not equal to operator, along with proper examples. Consider...
MySQL MAX and MIN function – Querychat
MySQL MAX and MySQL MIN are aggregate functions to find the maximum and minimum value from a given set, respectively. In this article, we will cover the basic use cases of the MAX and MIN functions through some examples. The following is the basic syntax for MAX/MIN function in MySQL:...
MySQL IFNULL Function And Practical Example – Querychat
A MySQL database, like many other databases, have a set of in-built functions which are classified as “control functions”. IFNULL is a control function in MySQL which is used to deal with data when data is expected to have NULL values. In this article, we will see MySQL IFNULL function...
How to get current date and time in MySQL? – Querychat
Date and time are critical to many applications. More than often, we need to work with current date and time in databases. In this article we will learn how to work with current date and time. The Need To Figure Out The Current Date /Time - The Present Moment In...
Top 3 best ways to check if Mysql row exists -Querychat
While working to take out information from your database, you can easily check if a row exists in a table or not, before defining an appropriate function for it. By using MySQL EXISTS function, not only can you check the existence of a row in the MySQL database but also...
Mysql Where Statement – Querychat
Through WHERE clause in MySQL, we can specify conditions which must be satisfied by a row in your database to get selected. The condition specified in the where clause must be true for the rows to be selected. MySQL SELECT WHERE clause, will avoid all the rows in the table...
SELECT DISTINCT statement in Mysql – Querychat
This article includes sample SQL code and data showing the correct usage of the MySQL DISTINCT function. MySQL DISTINCT statement is used to take out unique values from a table or group of tables. It could be a list of those values, or the count of such unique entries, inside...
CONVERT vs CAST in MySQL – Querychat
In SQL, we can convert the data type of values to another data type, This process of changing the data type is also known as explicit type casting. MySQL has two functions to change the data type: CAST CONVERT We will learn what is explicit data type casting, uses of...
SQL Server Row Number – Querychat
Finding the Row Number in SQL Server Using the ROW_NUMBER Function The SQL Server ROW_NUMBER() T-SQL function allows us to find the row number of each row depending on given ordering and partitioning conditions. This article provides step-by-step examples of how we can identify the row numbers in SQL Server...
1 2 22 23 24