Order by

An ORDER BY clause in SQL specifies that a SQL SELECT statement returns a result set with the rows being sorted by the values of one or more columns.

Without this clause, the relational database system may return the rows in any order.

A view is a logical relational table, and the relational model mandates that a table is a set of rows, implying no sort order whatsoever.

The SQL standard's core functionality does not explicitly define a default sort order for Nulls.

Vendors who do not implement this functionality may specify different treatments for Null sorting in the DBMS.