MySQL less than or equal operator
less than or equal operator
MySQL less than or equal operator checks whether an expression is either less than or equal to another expression.
Syntax:
<=
MySQL Version: 8.0
Example:
The following MySQL statement will fetch those publishers from the publisher table who have less than or equal to 6 branch offices.
Code:
SELECT pub_name,country,pub_city,no_of_branch
FROM publisher
WHERE no_of_branch<=6;
Relational Algebra Expression:
Relational Algebra Tree:
Sample table: publisher
Output:
mysql> SELECT pub_name,country,pub_city,no_of_branch -> FROM publisher -> WHERE no_of_branch<=6; +------------------------------+-----------+-----------+--------------+ | pub_name | country | pub_city | no_of_branch | +------------------------------+-----------+-----------+--------------+ | New Harrold Publication | Australia | Adelaide | 6 | | Pieterson Grp. of Publishers | UK | Cambridge | 6 | +------------------------------+-----------+-----------+--------------+ 2 rows in set (0.02 sec)
Slideshow of MySQL Comparison Function and Operators
Previous: LEAST()
Next: LESS THAN OPERATOR(<)
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics