Global Information Lookup Global Information

Order by information


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. The sort criteria does not have to be included in the result set (restrictions apply for SELECT DISTINCT, GROUP BY, UNION [DISTINCT], EXCEPT [DISTINCT] and INTERSECT [DISTINCT].) The sort criteria can be expressions, including column names, user-defined functions, arithmetic operations, or CASE expressions. The expressions are evaluated and the results are used for the sorting, i.e., the values stored in the column or the results of the function call.

ORDER BY is the only way to sort the rows in the result set. Without this clause, the relational database system may return the rows in any order. If an ordering is required, the ORDER BY must be provided in the SELECT statement sent by the application. Although some database systems allow the specification of an ORDER BY clause in subqueries or view definitions, the presence there has no effect on the final result-set order, but makes sense when combined with a result offset clause or a fetch first clause. 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 only exception are constructs like ORDER BY ORDER OF ... (not standardized in SQL:2003) which allow the propagation of sort criteria through nested subqueries.

The SQL standard's core functionality does not explicitly define a default sort order for Nulls. With the SQL:2003 extension T611, "Elementary OLAP operations", nulls can be sorted before or after all data values by using the NULLS FIRST or NULLS LAST clauses of the ORDER BY list, respectively. Not all DBMS vendors implement this functionality, however. Vendors who do not implement this functionality may specify different treatments for Null sorting in the DBMS.[1]

Structure ORDER BY ... DESC will order in descending order, otherwise ascending order is used. (The latter may be specified explicitly using ASC.)

  1. ^ "NULL Handling in SQLite Versus Other Database Engines". Retrieved January 25, 2009.

and 25 Related for: Order by information

Request time (Page generated in 0.9259 seconds.)

Order by

Last Update:

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....

Word Count : 376

Order of the British Empire

Last Update:

The Most Excellent Order of the British Empire is a British order of chivalry, rewarding contributions to the arts and sciences, work with charitable and...

Word Count : 4243

Order of the Bath

Last Update:

The Most Honourable Order of the Bath is a British order of chivalry founded by King George I on 18 May 1725. The name derives from an elaborate medieval...

Word Count : 7856

Dominican Order

Last Update:

The Order of Preachers (Latin: Ordo Praedicatorum; abbreviated OP), also known as the Dominican Order, is a Catholic mendicant order of pontifical right...

Word Count : 11346

Order of the Garter

Last Update:

The Most Noble Order of the Garter is an order of chivalry founded by Edward III of England in 1348. The most senior order of knighthood in the British...

Word Count : 6074

Order of Australia

Last Update:

14 February 1975 by Elizabeth II, Queen of Australia, on the advice of the Australian Government. Before the establishment of the order, Australian citizens...

Word Count : 4234

Teutonic Order

Last Update:

The Teutonic Order is a Catholic religious institution founded as a military society c. 1190 in Acre, Kingdom of Jerusalem. The Order of Brothers of the...

Word Count : 8874

Order

Last Update:

Look up order or Order in Wiktionary, the free dictionary. Order, ORDER or Orders may refer to: A socio-political or established or existing order, e.g....

Word Count : 924

Gag order

Last Update:

A gag order (also known as a gagging order or suppression order) is an order, typically a legal order by a court or government, restricting information...

Word Count : 3611

Word order

Last Update:

In linguistics, word order (also known as linear order) is the order of the syntactic constituents of a language. Word order typology studies it from...

Word Count : 5436

Order of Canada

Last Update:

well as efforts by non-Canadians who have made the world better by their actions. Membership is accorded to those who exemplify the order's Latin motto,...

Word Count : 6195

The Order

Last Update:

The Order may refer to: The Order (comics), the name of two fictional comic-book superhero teams in the Marvel Comics universe The Order: 1886, a video...

Word Count : 230

Order Order Out of Order

Last Update:

Channel. 28 December 2018. "Order Order Out Of Order Movie Review {3.0/5}: Critic Review of Order Order Out Of Order by Times of India". Times of India...

Word Count : 428

Order of Jamaica

Last Update:

The Order of Jamaica is the fifth of the six orders in the Jamaican honours system. The Order was established in 1969, and it is considered the equivalent...

Word Count : 190

Court order

Last Update:

A court order is an official proclamation by a judge (or panel of judges) that defines the legal relationships between the parties to a hearing, a trial...

Word Count : 365

Livonian Order

Last Update:

Livonian Order was an autonomous branch of the Teutonic Order, formed in 1237. From 1435 to 1561 it was a member of the Livonian Confederation. The order was...

Word Count : 1100

Doric order

Last Update:

The Doric order was one of the three orders of ancient Greek and later Roman architecture; the other two canonical orders were the Ionic and the Corinthian...

Word Count : 3525

Order of the Niger

Last Update:

orders of merit: the Order of the Niger and the Order of the Federal Republic. The two highest honours, the Grand Commander in the Order of the Federal Republic...

Word Count : 338

Alphabetical order

Last Update:

Alphabetical order is a system whereby character strings are placed in order based on the position of the characters in the conventional ordering of an alphabet...

Word Count : 5305

Restraining order

Last Update:

A restraining order or protective order, is an order used by a court to protect a person in a situation often involving alleged domestic violence, child...

Word Count : 3039

Lexicographic order

Last Update:

lexicographic or lexicographical order (also known as lexical order, or dictionary order) is a generalization of the alphabetical order of the dictionaries to sequences...

Word Count : 3352

Total order

Last Update:

mathematics, a total order or linear order is a partial order in which any two elements are comparable. That is, a total order is a binary relation ≤...

Word Count : 3094

Orange Order

Last Update:

Orange Institution, commonly known as the Orange Order, is an international Protestant fraternal order based in Northern Ireland and primarily associated...

Word Count : 18340

Order book

Last Update:

An order book is the list of orders (manual or electronic) that a trading venue (in particular stock exchanges) uses to record the interest of buyers...

Word Count : 466

Money order

Last Update:

a more trusted method of payment than a cheque. The money order system was established by a private firm in Great Britain in 1762 and was expensive and...

Word Count : 1274

PDF Search Engine © AllGlobal.net