mysql

Firstly we are all known that MYSQL is relational database management system.

In MYSQL if we want get record in database table than you will use select statement.

Example: –

SELECT Keyword:

If you have database School and table name student and you want to see all student list.

Select * from student

 In above query you can see all record of student table.

WHERE Keyword:

If you have database School and table name student and you want to see student list of class 5 than we will use WHERE.

Select * from student where class = 5

In this query you will see the result of class 5 student list.

ORDER BY Keyword:

If you have database School and table name student and you want to use ORDER BY in query then record will sort ascending and descending order.

Select * from student order by name asc.

ORDER BY if you want data sort by multiple cloumn than you can also use ORDER BY column name.

Example : If you have school database and table name student and column age and class. Below query you can see.

Select * from student order by age ASC , class DESC.

[social_share_button themes='theme1']

Leave a Comment