Derived Tables with Firebird 2.0
26 04 2005One new feature is the support of Derived Tables.
A derived table is one that is created on-the-fly using the SELECT statement, and referenced just like a regular table or view. Derived tables exist in memory and can only be referenced by the outer SELECT in which they are created. A simple use of a derived table is shown here.
SELECT
FROM (SELECT
FROM Sales) AS a
The inner SELECT produces a derived table and replaces a regular table or view. The key thing to remember when using derived tables is that you must always use an alias (e.g., AS a). The following shows the error produced when the alias is omitted.
SELECT
FROM (SELECT
FROM Sales)
Kategorien : Computers & IT
Trackbacks : Keine Trackbacks »
| Top Exits (4)