Jump to: navigation, search

Mysql OPERATOR GREATER THAN OR EQUAL TO

From w3cyberlearnings

Contents

MySQL Greater Than or Equal

This operator checks the value for greater than or equal to.

Syntax

N is a number to check for greater than or equal to M.

 N >= M;

Example 1


mysql> SELECT 3 >= 3, 3 >= 4;
+--------+--------+
| 3 >= 3 | 3 >= 4 |
+--------+--------+
|      1 |      0 | 
+--------+--------+
1 row in set (0.00 sec)

Example 2

mysql> SELECT * FROM totalearn;
+----+------------+-------------+
| id | total_hour | hourly_rate |
+----+------------+-------------+
|  1 |         30 |          50 | 
|  2 |         40 |          50 | 
|  3 |         30 |          80 | 
|  4 |         34 |          90 | 
+----+------------+-------------+
4 rows in set (0.00 sec)

mysql> SELECT * FROM totalearn
    -> WHERE hourly_rate >=80;
+----+------------+-------------+
| id | total_hour | hourly_rate |
+----+------------+-------------+
|  3 |         30 |          80 | 
|  4 |         34 |          90 | 
+----+------------+-------------+
2 rows in set (0.01 sec)


Related Links



Navigation
Web
SQL
MISC
References