15.00 - TABLE - Teradata Database

Teradata Database Support Utilities

Teradata Database



The TABLE command displays rows from the subtable specified by the tid argument.


Note: The online help lists the row options (/P, /S, /M, /L, /H) as /rowopt. You can type the options at the beginning or end of the command.


Syntax Element



Positions to the physical rows or subtable requested. At least one physical row must be in the selected range. Nothing is displayed unless there is a problem.

Physical rows store one of several types of data, such as regular table row data or column partition data.

/S or /C

Counts the number of physical rows selected. This is the default for all subtables except the table header subtable.

/M or /I

Displays only the row header information (length, RowID, and flags).

/L or /R

Formats the row header and fields in the physical row. This option is the default for the table header subtable; however, this option is not the default formatted field display because the table header subtable has a special row format and requires special formatting.


Formats the row header and display the entire physical row in hexadecimal, including the header.


Specifies the subtable to display. The tid specification must include a typeandindex value. For detailed information, see “Subtable Identifiers (tids)” on page 79.


Selects the range of rows to display. No matter what is displayed, the resulting context is the whole subtable.

For detailed information, see “Specifying Display Ranges (ordinalrange)” on page 83.

The online help lists this option as rangeopt.

Usage Notes  

The prompt for the TABLE selector is shown below:


In addition to global and upper-level commands, the following lower-level commands are allowed at the TABLE prompt:

  • DROP
  • NEXT
  • PREV
  • Use the option definitions of the ROW command with these lower-level commands. The current selected object can be a subtable or range of subtables. The prompt reflects the current selection.

    The TABLE command operates on subtables. In the Teradata Database, a subtable is a collection of physical rows, and a table is a collection of subtables. The physical rows of a particular subtable may store data rows, index rows, table header rows, column partition values, or other types of data. Therefore, you can use the TABLE command to display rows from the primary data subtable, the table header subtable, a secondary index subtable, etc. For example, to obtain a formatted display of the table header, use Table /L x y H 1 where x and y make up the tablenumber which identifies the table, and H is the typeandindex value which identifies the table header subtable. For more information on identifying tables and subtables, see “Subtable Identifiers (tids)” on page 79.

    The initial context for the TABLE command consists of the physical rows of the subtable, and the ordinalrange argument is interpreted with respect to this context. Positive integers without the BEG/END prefix are ordinal row numbers, where 1 is the first row. Negative integers without the BEG/END prefix are backwards displacements from the last row, so that -1 is the second to last row.

    Note: This differs from the interpretation of an ordinalrange for the DISPLAY command, where integers without the BEG/END prefix always refer to objects outside the current context, so that positive values refer to objects past the end of the current context, and negative values refer to objects before the beginning of the current context.

    The resulting context from a TABLE command is a whole subtable, a subtable range, or null, but never a row range. The ordinalrange can restrict the display to a subset of the resulting context, even though this ordinalrange has no affect on the resulting context.

    If the TABLE command uses a wildcard for the type part of the tid, the resultant context is special (nothing), and this context is not usable with an ordinalrange argument. The display is a multiple subtable display, where each subtable is constrained by the ordinal range. For each subtable, the BEG/END +/- number rules apply, except that the - number construct is not allowed.

    For more information on ordinalrange, see “Specifying Display Ranges (ordinalrange)” on page 83.


    The following command shows a medium display of the first five rows of table 1000 0 400:

    Filer ==> table /m 1000 0 400 1 to 5
    TableID:   1000  0000  0400        ROWS:   0000087B   SECTS:   0000117D


    The following example shows a row header for the second-to-the-last row of a user table. The following command shows a medium display of the row header for the second-to-last row of table employee.ttt:

    table "employee.ttt" p end-1 /m