What is the ORDER BY statement in MySQL

0 votes
Hi!!

Can someone tell me what is ORDER BY statement in MySQL?
Nov 23, 2018 in Database by DataKing99
• 8,250 points
657 views

1 answer to this question.

0 votes

This statement is used to sort the desired results in ascending or descending order. By default, the results would be sorted in ascending order. If you want the records in the result-set in descending order, then use the DESC keyword.

Syntax:

SELECT column1, column2, ...
FROM table_name
ORDER BY column1, column2, ... ASC|DESC;
answered Nov 23, 2018 by Sahiti
• 6,370 points

Related Questions In Database

0 votes
0 answers

What is the purpose of Order By 1 in SQL select statement?

I discovered numerous views with an order ...READ MORE

Aug 19, 2022 in Database by Kithuzzz
• 38,000 points
672 views
0 votes
1 answer

what is the syntax of OR statement in MySQL?

The OR operator displays those records which ...READ MORE

answered Dec 1, 2018 in Database by Sahiti
• 6,370 points
674 views
0 votes
1 answer

What is the ALTER command in MySQL?

ALTER The ALTER command is used to add, ...READ MORE

answered Nov 28, 2018 in Database by Sahiti
• 6,370 points
656 views
0 votes
1 answer

What is the UPDATE command in MySQL?

This statement is used to modify the ...READ MORE

answered Nov 28, 2018 in Database by Sahiti
• 6,370 points
723 views
0 votes
1 answer

Why is not preferable to use mysql_* functions in PHP?

The reasons are as follows: The MySQL extension: Does ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,250 points
1,258 views
0 votes
1 answer

Find values in a comma separated string in a MySQL query

You can add commas to the left and ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,370 points
12,883 views
0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,370 points
2,302 views
0 votes
1 answer
0 votes
1 answer

What is GROUP BY statement in MySQL?

This statement is used with the aggregate ...READ MORE

answered Nov 23, 2018 in Database by Sahiti
• 6,370 points
648 views
0 votes
1 answer

What is the syntax of USE statement in MySQL?

The USE statement is used to mention ...READ MORE

answered Nov 27, 2018 in Database by Sahiti
• 6,370 points
765 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP