MySQL Where Clause Exercise
Write a mysql statement to select data of only students with age either in 22,23,24 and department is 'EC'
Suppose the table is -
+----+--------------+------------+-----+
| id | name | department | age |
+----+--------------+------------+-----+
| 1 | Maria Gloria | CS | 22 |
| 2 | John Smith | IT | 23 |
| 3 | Gal Rao | CS | 22 |
| 4 | Jakey Smith | EC | 24 |
| 5 | Rama Saho | IT | 22 |
| 6 | Maria Gaga | EC | 23 |
+----+--------------+------------+-----+
The following statement is used to select data of only students with age either in 22,23,24 and department is 'EC'.
Output of the above statement -
need an explanation for this answer? contact us directly to get an explanation for this answer+----+--------------+------------+-----+ | id | name | department | age | +----+--------------+------------+-----+ | 4 | Jakey Smith | EC | 24 | | 6 | Maria Gaga | EC | 23 | +----+--------------+------------+-----+