
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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