Silversleaves
E info@silversleaves.com
T +44 121 288 2824
  • Website Design
  •  ·
  • Commercial Photography

  • Database Development
  •  ·
  • Business Intelligence
  • Home
  • Silversleaves
    • Services
    • Portfolio
  • Web
    • CSS
      • Sticky Footer
      • CSS3 Opacity
    • Firefox Addons
      • DGSCheck
  • Database
    • Oracle Certification
      • SQL Fundamentals I - Part 1
        • Introduction
        • Relational Theory
        • DESCRIBE
      • SQL Fundamentals I - Part 2
        • SQL Operators & Expressions
        • WHERE
        • ORDER BY
        • Ampersand Substitution
      • SQL Fundamentals I - Part 3
        • Single Row Functions
        • Conversion Functions
        • Group Functions
      • SQL Fundamentals I - Part 4
        • Joining Tables
        • Subqueries
        • Set Operators
        • DML
        • Transactions
      • SQL Fundamentals I - Part 5
        • Manipulating Tables
        • Schema Objects
  • Business Intelligence
    • Coming Soon
  • Photography
    • Food
      • Sweet
      • Savory
    • Drink
      • Liquids
    • Interior
      • Hotel
  • Graphic Design
    • Branding
      • Logos
    • Print
      • Poster
      • Brochure
      • Advert
  • Partners
    • Élite Hotels, Turkey
    • Terzioğlu İnsaat, Turkey
  • Blog

Oracle Certification - SQL Fundamentals I - ORDER BY Clause

  • ORDER BY
  • Asc/Desc
  • NULLS
  • Positional
  • Conclusion

The ORDER BY Clause

The ORDER BY clause only changes the way in which the results of a SELECT statement are presented, it does not change the data that is retrieved. The format of the ORDER BY clause is:

Ascending / Descending Sorts

The default sort order is ascending, i.e. lowest to highest (this is an alphanumeric sort). This can be overridden on a column by column basis using the ASC / DESC commands.

NULLS FIRST / NULLS LAST

The default behaviour is for Oracle to list nulls last. Again this can be override on a column by column basis.

Positional Sorting

There is shorthand way of specifying the sort columns. Instead of specifying the columns names, the position that the column appears in the SELECT list is used instead:

The exam will often include questions that test knowledge of the default sort orders..

Next up is Ampersand Substitution.

<< Previous Topic
Next Topic >>
© Silversleaves Limited 2012