© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
M. SimonGetting Started with SQL and Databaseshttps://doi.org/10.1007/978-1-4842-9493-2_4

4. Ordering Results

Mark Simon1  
(1)
Ivanhoe VIC, VIC, Australia
 
A Relational Database is based on a number of mathematical principles, including the notion that a table is a set of rows. Two important properties of mathematical sets are
  • A set has no duplicates.

  • A set is not ordered.

We will discuss the question of duplicates later, but for now let’s have a look at row order.

SQL does not specify how data is to be stored, as that is a matter for the DBMS software. Neither does it specify in what order data should be fetched.

However, you do have the option to specify a row ...

Get Getting Started with SQL and Databases: Managing and Manipulating Data with SQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.