Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS forUNIX SQL Reference - NCR

NCR Teradata RDBMS forUNIX SQL Reference - NCR, 1997. - 913 p.
Download (direct link): teradataforunix1997.pdf
Previous << 1 .. 135 136 137 138 139 140 < 141 > 142 143 144 145 146 147 .. 241 >> Next

tname the name of a table or view. The tname.* in the SELECT list can define the table from which rows are to be returned when two or more tables are referenced in the FROM clause.
aname a different, temporary name (alias) for the table that is referenced by tname. aname must be used during a self-join operation on the table. aname is also used to name expressions.
AS an introduction to aname.
FROM the names of one or more tables, views, or derived tables from which expr is to be derived. See the section FROM list for detail.
joined_table the name of a joined table.
INNER a join in which qualifying rows from one table are combined with qualifying rows from another table according to some join condition. Types of inner joins include exclusion, merge, nested, product, and row ID. This is the default join type.
OUTER a join in which qualifying rows from one table that do not have matches in the other table, are included in the join result. The rows from the first table are extended with nulls.
LEFT OUTER the table that was listed first in the FROM clause. In a LEFT OUTER JOIN, the rows from the left table that are not returned in the result of the inner join of the two tables are returned in the outer join result, and extended with nulls.
RIGHT OUTER the table that was listed second in the FROM clause. In a RIGHT OUTER JOIN, the rows from the right table that are not returned in the result of the inner join of the two tables are returned in the outer join result and extended with nulls.

Teradata RDBMS for UNIX SQL Reference

8-107
Teradata SQL Syntax Guide

CREATE VIEW

Syntax Element . . . Specifies . . .
FULL OUTER a join that returns rows from both tables. In a FULL OUTER JOIN, rows from both tables that have not been returned in the result of the inner join are returned in the outer join result, and extended with nulls.
JOIN an introduction to the name of the second table to participate in the join.
joined_table the name of the joined table.
ON search_condition one or more conditional expressions that must be satisfied by the result rows. An ON condition clause is required if the FROM clause specifies outer join syntax.
CROSS JOIN A CROSS JOIN is an unconstrained, or Cartesian join; it returns all rows from all tables specified in the FROM clause.
single_table the name of table participating in join.

Derived Tables

The derived table allows the FROM list to specify a spool file, comprised of selected data from an underlying table(s). The derived table acts like a viewed table. This is an extension of a current functionality. It is a full ANSI SQL feature.

(subquery) SELECT statements.
AS an optional introductory clause to derived table name.
derived_tname the name of derived table.
col_name the column name. The col_name field is for the columnname only; forms such as Databasename.Tablename.Columnname, or Tablename.Columnname should not be used.
WHERE an introduction to the search condition in the SELECT statement.
search_cond a conditional search expression that must be satisfied by the row(s) returned by the statement.
GROUP BY an introduction to a reference to one or more expressions in the select expression list.
col_name specifies the name(s) of columns used in the GROUP BY clause in the SELECT statement.
col_pos specifies the numeric position of the column(s) used in the GROUP BY clause.
expr the expression(s) used in the GROUP BY clause.
HAVING an introduction to the conditional clause in the SELECT statement.

8-108

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

CREATE VIEW

Syntax Element . . . Specifies . . .
cond one or more conditional expressions that must be satisfied by the result rows. Aggregate operators may be used with HAVING. HAVING cond selects rows from a single group defined in the select expr-list that has only aggregate results, or it selects rows from the group or groups defined in a GROUP BY clause.
ORDER BY the order in which result rows are to be sorted.
col_name the name(s) of columns used in the ORDER BY clause in the SELECT statement. These can be ascending or descending.
col_pos the numeric position of the column(s) used in the ORDER BY clause. This can be ascending or descending.
expr specifies the numeric position of the expression in the expr-list either by name, or by means of a constant.
ASC DES The default order is ASC. * ASC specifies ascending order; DESC specifies descending order. * If a sort option is not given, result values are sorted in ascending order according to the client system’s collating sequence. If ORDER BY is not specified, rows are returned unsorted.
WITH CHECK OPTION Restricts the rows that can be accessed in the table by an INSERT or UPDATE statement. Refer to the section “WITH CHECK OPTION Clause in Views” below.

If a user other than the owner utilizes a view, then all of the relevant PirvilegGs Required privileges needed by the owner of the view to access underlying
Previous << 1 .. 135 136 137 138 139 140 < 141 > 142 143 144 145 146 147 .. 241 >> Next