- MySQL 8 for Big Data
- Shabbir Challawala Jaydip Lakhatariya Chintan Mehta Kandarp Patel
- 36字
- 2021-08-20 10:06:12
Greater than and Less than
Greater than (>) checks whether the value of the left field is greater than the value of the right field. If yes, then the condition becomes true. Less than (<) checks whether the value of the left field is less than the value of the right field. We can also use >/< and equals together.
For example, the following query is used to retrieve all records with login attempts more than the value 2:
SELECT * FROM `users` WHERE `login_attempts` > 2;