Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The output from the HELP TABLE command comes from Data Dictionary.</p> <p>If I understand correctly, you want to create a new table with the following output.</p> <pre> help table t1; *** Help information returned. 4 rows. *** Total elapsed time was 1 second. Column Name Type Comment ------------------------------ ---- -------- a1 I ? b1 CF ? c1 D ? d1 DA ? </pre> <p>You can get all of those three columns (or even more) from the table DBC.TVFields.</p> <pre> help table dbc.tvfields; help table dbc.tvfields; *** Help information returned. 37 rows. *** Total elapsed time was 1 second. Column Name Type Comment ------------------------------ ---- ---------------- TableId BF ? FieldName CV ? FieldId I2 ? Nullable CF ? FieldType CF ? MaxLength I ? DefaultValue CV ? DefaultValueI BV ? TotalDigits I2 ? ImpliedPoint I2 ? FieldFormat CV ? FieldTitle CV ? CommentString CV ? CollationFlag CF ? UpperCaseFlag CF ? DatabaseId BF ? Compressible CF ? CompressValueList CV ? FieldStatistics BV ? ColumnCheck CV ? CheckCount I2 ? CreateUID BF ? CreateTimeStamp TS ? LastAlterUID BF ? LastAlterTimeStamp TS ? LastAccessTimeStamp TS ? AccessCount I ? SPParameterType CF ? CharType I2 ? LobSequenceNo I2 ? IdColType CF ? UDTypeId BF ? UDTName CV ? TimeDimension CF ? VTCheckType CF ? TTCheckType CF ? ConstraintId BF ? </pre> <p>But first we need to find out DatabaseId and TableId.</p> <pre> select databaseid from dbc.dbase where databasename='db1'; *** Query completed. One row found. One column returned. *** Total elapsed time was 1 second. DatabaseId ---------- 00000F04 </pre> <pre> select TVMId from dbc.tables2 where databaseid='00000F04'xb and TVMName='t1'; *** Query completed. One row found. One column returned. *** Total elapsed time was 1 second. TVMId ------------ 0000D8070000 </pre> <p>Now you can list all the columns you need and store them correspondingly.</p> <pre> select * from dbc.tvfields where databaseid='00000F04'xb and tableid='0000D8070000'xb; </pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload