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 .. 169 170 171 172 173 174 < 175 > 176 177 178 179 180 181 .. 241 >> Next

WITH CHECK OPTION

ORDER BY

expr
-col_name - -ASC-
—col_pos — DESC

FF07B069

aname

8-226

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

REPLACE VIEW

where:

Syntax Element... Specifies . . .
viewname the name of the new view. If viewname is not fully qualified, the default database is used.
col_name the name of a view column. If more than one column is specified, list the col_names in the order in which each column is to be displayed for the view. It is recommended that a view have a maximum of 50 columns (see Usage Notes).
AS a keyword that introduces the view definition.
LOCKING a modifier that can be used to specify the type of lock to be placed on a database, table, view, or row. This setting overrides any default usage lock placed on that object by the Teradata RDBMS (see Usage Notes below, and the section on “LOCKING Modifier” in this chapter).
DATABASE TABLE VIEW an optional keywords that introduce the name of a database, table, or view that is to be locked
ROW an optional keyword specifying a row or rows to be locked in accordance with the defining statement (see below).
dbname the name of the database (or user) to be locked.
tname the name of the table to be locked.
vname the name of the view to be locked.
FOR IN an introduction to the type of lock to be placed. The IN keyword may be used for SQL compatibility.
ACCESS READ SHARE WRITE EXCLUSIVE the type of lock to be placed. The SHARE keyword may be used as a synonym for READ, for SQL compatibility.
MODE an optional keyword that may be used for SQL compatibility.
NOWAIT that if the indicated lock cannot be obtained, the statement should be aborted. Used for situations where it is not desirable to have a statement wait for resources, possibly also tying up resources in the process of waiting.
SELECT a keyword indicating that the expr(s) to be associated with col_name(s) are to be selected from one or more existing tables and/or views.
DISTINCT that only one row is to be returned from any set of duplicates that might result from a given expr-list. Two rows are considered duplicates only if each value in one is equal to the corresponding value in the other.
ALL that all rows, including duplicates, are to be returned in the results of the expression list. This is the default value.

Teradata RDBMS for UNIX SQL Reference

8-227
Teradata SQL Syntax Guide

REPLACE VIEW

Syntax Element... Specifies . . .
expr an expression. Aggregate and arithmetic operators may be used with expressions.
* that all columns of all tables referenced in the FROM clause be returned. When qualified by tname, specifies that all columns of only tname are to be returned. View columns are explicitly enumerated when views are defined; therefore, if a table is changed after a view is defined, those changes will not appear if the SELECT * construct is used.
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 optional clause introducing 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 null values.
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 null values.
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 null values.
full OUTER 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 a keyword introducing 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 an outer join.

8-228

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide
Previous << 1 .. 169 170 171 172 173 174 < 175 > 176 177 178 179 180 181 .. 241 >> Next