Result set
Encyclopedia
An SQL
result set is a set of rows from a database
, as well as meta-information
about the query such as the column names, and the types and sizes of each column. Depending on the database system
, the number of rows in the result set may or may not be known. Usually, this number is not known up front because the result set is built on-the-fly. Precomputation
s often impose undesired performance impacts.
A result set is effectively a table. The
clause can be used in a query to impose a certain sort condition on the rows. Without that clause, there is no guarantee whatsoever on the order in which the rows are returned.
SQL
SQL is a programming language designed for managing data in relational database management systems ....
result set is a set of rows from a database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...
, as well as meta-information
Meta-information
Meta-information may refer to:*Metadata*Knowledge taggingMeta Information is information on the information held within a data set. If data were a journal article meta-information would be the abstract and conclusion...
about the query such as the column names, and the types and sizes of each column. Depending on the database system
Database system
A database system is a term that is typically used to encapsulate the constructs of a data model, database Management system and database....
, the number of rows in the result set may or may not be known. Usually, this number is not known up front because the result set is built on-the-fly. Precomputation
Precomputation
In algorithms, precomputation is the act of performing an initial computation before run time to generate a lookup table that can be used by an algorithm to avoid repeated computation each time it is executed. Precomputation is often used in algorithms that depend on the results of expensive...
s often impose undesired performance impacts.
A result set is effectively a table. The
ORDER BY
Order by (SQL)
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 do not have to be included in the result set. The sort criteria can be expressions, including – but not limited to – column...
clause can be used in a query to impose a certain sort condition on the rows. Without that clause, there is no guarantee whatsoever on the order in which the rows are returned.