![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to select an empty result set in MySQL?
Select an empty result set with the help of dummy table ‘dual’ from MySQL. The query is as follows −
mysql> select 1 from dual where false; Empty set (0.00 sec)
In the above query, “dual” is a dummy table and the above condition false. Therefore, it returns empty set.
Let us check with true condition. It will return the selected value. The query is as follows −
mysql> select 1 from dual where true;
The following is the output −
+---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.00 sec)
Advertisements