For getting specific rows as output, we need to use WHERE clause in SELECT statement. This is because MySQL returns rows based on the conditional parameters we give after the WHERE clause.
Suppose we want to get rows containing the name 'Aarav' from the student table, we can use the following query to achieve this:
mysql> Select * from Student WHERE Name = 'Aarav'; +------+-------+---------+---------+ | Id | Name | Address | Subject | +------+-------+---------+---------+ | 2 | Aarav | Mumbai | History | +------+-------+---------+---------+ 1 row in set (0.00 sec)
The above is the detailed content of How can we get specific rows as output from MySQL table?. For more information, please follow other related articles on the PHP Chinese website!