About 2,170,000 results
Open links in new tab
  1. SQL ORDER BY Keyword - W3Schools

    The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword.

  2. ORDER BY clause (Transact-SQL) - SQL Server | Microsoft Learn

    Nov 22, 2024 · Sorts data returned by a query in SQL Server. Use this clause to: Order the result set of a query by the specified column list and, optionally, limit the rows returned to a specified range. The order in which rows are returned in a result set aren't guaranteed unless an ORDER BY clause is specified.

  3. SQL ORDER BY Clause with 7 Examples - LearnSQL.com

    Sep 27, 2022 · It’s important to note that ORDER BY sorts in ascending order by default; while you can use the ASC keyword to indicate you want results in ascending order, you don’t have to include it. In a field with numbers, ascending order puts the smallest number first, followed by the next smallest, and so on. The biggest number will come last.

  4. SQL ORDER BY Examples to Sort and Order Data

    Apr 10, 2023 · In this SQL tutorial, we will look at different ways you can use SQL to order data along with several examples in a Microsoft SQL Server database. Sorting result sets is done using the SQL ORDER BY clause in a SELECT statement. ORDER BY, as the name implies, orders a result set in ascending or descending order.

  5. ORDER BY in MySQL: DESC & ASC Query with EXAMPLE - Guru99

    Jul 17, 2024 · MySQL ORDER BY is used in conjunction with the SELECT query to sort data in an orderly manner. The MySQL ORDER BY clause is used to sort the query result sets in either ascending or descending order. SELECT statement... [WHERE condition | GROUP BY `field_name(s)` HAVING condition] ORDER BY `field_name(s)` [ASC | DESC]; HERE.

  6. SQL ORDER BY Clause - W3Schools

    ORDER BY column1 [ASC|DESC], column2 [ASC|DESC], ...: Orders the results by the specified columns. You can use ASC for ascending order (default) or DESC for descending order. Let's explore how to implement the ORDER BY clause in real-world scenarios with some examples:

  7. SQL Server ORDER BY Clause with Examples - SQL ... - SQL Server

    What is ORDER BY clause in SQL Server? The SQL Server ORDER BY clause as the name indicates is used to sort output alphabetically or numerically. It takes two arguments – ASC or DESC. ASC sorts the output in ascending order. (from a to z in case of alphabets and from lower to higher value in case of numbers). It is the.

  8. Order By - SQL Tutorial

    In this syntax, column1, column2, etc. are the columns that you want to sort the result set by, and ASC or DESC specifies the sort order. By default, the ORDER BY clause sorts the result set in ascending order. If you want to sort the result set in descending order, …

  9. SQL ORDER BY – Sorting Data in SQL Table in Descending or Ascending Order

    ORDER BY clause in SQL enables us to sort results of the query by specific field (column) or more columns. There are 2 sorting options: Ascending order (ASC) – sorts records from lowest to highest in case of numbers and from A to Z in case of text strings

  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.

  11. Some results have been removed
Refresh