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 .. 157 158 159 160 161 162 < 163 > 164 165 166 167 168 169 .. 241 >> Next


• Unique values - VARCHAR (20)

• Column names - VARCHAR (512)

Teradata RDBMS for UNIX SQL Reference

8-185
Teradata SQL Syntax Guide

HELP TABLE HELP VIEW HELP MACRO

HELP TABLE HELP VIEW HELP MACRO

When a HELP TABLE or HELP VIEW statement is entered, the Teradata RDBMS returns a list of the columns or parameters in the specified table, view, or macro. The columns or parameters are listed in the order in which they were defined.

The attributes are returned as shown in Table 8-5.

Table 8-5

Table, View, or Macro Attributes

Field Data Type Nullable? Comments
COLUMN NAME CHAR (30) no
Type
I1 BYTEINT CHAR (2) yes Note: GF and GV type abbreviations will be replaced in the next release.
I2 SMALLINT
I INTEGER
D DECIMAL (or NUMERIC)
F FLOAT (or REAL or DOUBLE PRECISION)
DA DATE
CF CHAR
CV VARCHAR
GF GRAPHIC
GV VARGRAPHIC
GV LONG VARGRAPHIC
BF BYTE
BV VARBYTE
COMMENT VARCHAR (255) yes
NULLABLE CHAR (1) yes
Y can be NULL
N is NOT NULL

8-186

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

HELP TABLE HELP VIEW HELP MACRO

Field Data Type Nullable? Comments
FORMAT CHAR (30) yes Shows display format.
TITLE VARCHAR (60) yes
MAX LENGTH SMALLINT yes Maximum amount of storage (in bytes).
DECIMAL TOTAL DIGITS SMALLINT If type is decimal.
DECIMAL FRACTIONAL DIGITS SMALLINT yes If type is decimal.
RANGE LOW FLOAT yes Always null. BETWEEN clause now included in column constraint.
RANGE HIGH FLOAT yes Always null. BETWEEN clause now included in column constraint.
UPPERCASE CHAR (1) yes If type is CHAR or VARCHAR.
N not declared as UPPERCASE or CASESPECIFIC
U UPPERCASE
C CASESPECIFIC
B BOTH
TABLE/VIEW CHAR (1) If HELP TABLE or HELP VIEW
T table
V view
DEFAULT VALUE VARCHAR (255) yes

For some larger tables, a request to display all or most of the Table Columns columns will result in an error message. If this occurs, the user can

display the table definition with the SHOW TABLE statement, and may be able to display column attributes by querying the Data Dictionary view named DBC.columns.

If a view has more than 50 columns, HELP VIEW returns an empty View Columns result. To obtain column information from oversized views, use the

HELP statement in the form:

HELP COLUMN viewname.*

For details on defining views, refer to the Usage Notes of the “CREATE VIEW” statement, and to Creating Views.

Teradata RDBMS for UNIX SQL Reference

8-187
Teradata SQL Syntax Guide

HELP TABLE HELP VIEW HELP MACRO

Macro Parameters

If a macro contains no parameters, a message is returned to indicate that no parameters have been defined.

HELP MACRO also may be used to obtain a comment that explains how to use the macro.

8-188

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

HELP (OnLine)

HELP (OnLine)

Function

The HELP (OnLine) feature allows users to request help on any Teradata SQL syntax or RDBMS host utility syntax topic. This HELP is distinct from the other HELP commands, which provide information on the database. Refer also to the “HELP” statement, described in the previous section.

HELP is flagged as non-ANSI, when the SQL flagger is enabled.

Syntax

HELP-

' HELP

' SQL

' ARCHIVE-

' BULKLOAD

'DUMP-

FASTEXPORT

FASTLOAD

' MULTILOAD ¦

' PMPC

' TPCCONS-

ç

commandname

3

ç

commandname

3

TT

commandname

3

ç

commandname

3

commandname

3

3

commandname

3

3

commandname

3

3

commandname

3

3

commandname

3

ÇÃ

FF07R029

Teradata RDBMS for UNIX SQL Reference

8-189
Teradata SQL Syntax Guide

HELP (OnLine)

where:

Syntax Element ... Description
HELP HELP 'HELP' ; HELP ‘HELP’ displays information about using the online help command.
SQL ARCHIVE BULKLOAD DUMP FASTEXPORT FASTLOAD MULTILOAD PMPC TPCCONS SQL or one of the utilities. These are the topics about which HELP is requested. If these topics are not followed by a specific command name, a list of commands are displayed for that topic.
commandname An optional specific command or statement name (in SQL or the utility).

The online HELP topics are:

• Archive

• BulkLoad

• Dump

• FastExport

• FastLoad

• Help

• MultiLoad

• PMPC

• SQL

• TPCCONS

HELP ‘topic with optional CommandName’ can be typed in upper or lower case. The response for a HELP query on a non-existent topic is, “Query completed. No rows found”.

The HELP response is comprised of a set of rows ordered by line number. The maximum length of each row of text is 80 characters. When accessed through BTEQ, no BTEQ formatting is needed in order to view the whole HELP message.

Topics

Response Format

8-190

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

HELP (OnLine)

This statement . . . Displays . . .
HELP ‘sql’; a list of SQL commands.
Previous << 1 .. 157 158 159 160 161 162 < 163 > 164 165 166 167 168 169 .. 241 >> Next