MySQL less than operator
less than operator
MySQL less than operator checks whether an expression is less than the other.
Syntax:
<
MySQL Version: 8.0
Example: MySQL less than operator(<)
The following MySQL statement will fetch those publishers from the publisher table that has less than 8 branch offices.
Code:
SELECT pub_name,country,pub_city,no_of_branch
FROM publisher
WHERE no_of_branch<8;
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<8; +------------------------------+-----------+-----------+--------------+ | 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.00 sec)
Slideshow of MySQL Comparison Function and Operators
Previous: LESS THAN OR EQUAL OPERATOR(<=)
Next: LIKE
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics