

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
How does comparison operator work with date values in MySQL?
<p>Comparison operator between dates will work in a logical way. In the following example, while comparing two dates, MySQL is simply comparing two numbers or string −</p><pre class="prettyprint notranslate">mysql> select 20171027 < 20150825; +---------------------------+ | 20171027 < 20150825 | +---------------------------+ | 0 | +---------------------------+ 1 row in set (0.00 sec)</pre><p>The 0 output shows that the result of the above query is FALSE.</p><pre class="prettyprint notranslate">mysql> select 20171027 > 20150825; +--------------------------+ | 20171027 > 20150825 | +--------------------------+ | 1 | +--------------------------+ 1 row in set (0.00 sec)</pre><p>The output ‘1’ shows that the result of the above query is TRUE.</p>
- Related Questions & Answers
- How does MySQL QUOTE() function work with comparison values?
- How does tuple comparison work in Python?
- How will addition, subtraction, multiplication and division operator work with date values stored in MySQL table?
- In MySQL, how does the precedence of ! operator in comparison with NOT operator depends upon HIGH_NOT_PRECEDENCE SQL mode?
- How does * operator work on list in Python?
- How does the Comma Operator work in C++
- How does in operator work on list in Python?
- How does MySQL CASE work?
- How does concatenation operator work on list in Python?
- How does repetition operator work on list in Python?
- How does del operator work on list in Python?
- How does concatenation operator work on tuple in Python?
- How will addition, subtraction, multiplication, and division operator work with date represented as MySQL string?
- How does MySQL IF() function work?
- How does the * operator work on a tuple in Python?
Advertisements