About 3,220,000 results
Open links in new tab
  1. MySQL ORDER BY Keyword - W3Schools

    The ORDER BY keyword is used to sort the result-set in ascending or descending order. The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword.

  2. MySQL Order By Ascending and Descending - Tutorial Gateway

    Let me show you how to sort records using the command prompt. In this Order by example, we are sorting the First Name and Last Name in Ascending, then Yearly Income in Descending. USE company; SELECT First_Name, Last_Name, Education, Profession, Yearly_Income, Sales FROM customers ORDER BY First_Name ASC, Last_Name ASC, Yearly_Income DESC;

  3. MySQL ORDER BY Clause - GeeksforGeeks

    Jun 12, 2024 · In MySQL, the ORDER BY Clause is used to sort the result set either in ascending order or descending order. By default, the ORDER BY sorts the displayed data in ascending order. If you want your data displayed in descending order we need to use the DESC keyword along with the ORDER BY Clause.

  4. MySQL ORDER BY Clause: Usage & Examples - DataCamp

    The `ORDER BY` clause in MySQL is used to sort the result set of a query by one or more columns. It allows for ascending or descending order sorting, which can help organize data meaningfully. Usage

  5. MySQL Ascending Command - roseindia.net

    The Tutorial illustrate an example from 'MySQL Ascending Command'. To understand the example we execute SELECT ASCII (name), name FROM emp order by name that sort the data of the 'emp' table in ascending order. The ORDER BY clause is used to sort the records on the basis of name. List of Syntax: ASC clause: This is used to arrange data in ...

  6. Display Records in Ascending Order with MySQL - Online …

    Apr 7, 2020 · To display a list of records in a specific order, you need to set conditions and use ORDER BY. For this, use ORDER BY CASE statement. Let us first create a table −. -> ( -> Name varchar(20) -> ); Insert some records in the table using insert command −. Display all records from the table using select statement −.

  7. Order by ascending and descending MySQL - Devsheet

    Order by clause can be used to select MySQL Records in ascending and descending orders. If you want to order the rows in ascending order use below order by clause after select query. ORDER BY column_name ASC. To sort the Rows in …

  8. MySQL ORDER BY - MySQL Tutorial

    Show you how to use the MySQL ORDER BY clause to sort rows in the result set by one or more columns in ascending or descending order.

  9. MySQL :: MySQL 8.4 Reference Manual :: 5.3.4.4 Sorting Rows

    You can force a case-sensitive sort for a column by using BINARY like so: ORDER BY BINARY col_name. The default sort order is ascending, with smallest values first. To sort in reverse (descending) order, add the DESC keyword to the name of the column you are sorting by:

  10. SQL ORDER BY Keyword - W3Schools

    The ORDER BY command is used to sort the result set in ascending or descending order. The ORDER BY command sorts the result set in ascending order by default. To sort the records in descending order, use the DESC keyword.

Refresh