You are here: Core Reference > Coding > QueryPad > COLUMNS Command

COLUMNS Command

You can use QueryPad’s COLUMNS command to display information about the columns in a table or in a particular set of tables. When you use the COLUMNS command, QueryPad displays a list of the columns that match the criteria in your command. QueryPad can only provide columns information for those tables that are on the system to which QueryPad is currently connected.

To use the COLUMNS command:

  1. Display QueryPad
  2. Connect to the appropriate system (see Connect QueryPad to a Database)
  3. Enter the ?COLUMNS command followed by the arguments that are appropriate to your requirements.
  4. The correct syntax is:
  5. ?COLUMNS <Schema> <Table> <Column>

  6. Where:
    • <Schema> is the group that contains the tables that have the columns you want QueryPad to display. Do not include the angle brackets < >.
    • <Table> is the name of the table that contains the columns that you want QueryPad to display.
    • <Column> is the name of the column you want QueryPad to display.

      If you specify an exact schema and table, then only the columns of that table are listed. However, if you specify a pattern for a schema or table (by using the % character), then the columns that match the pattern are listed.

      Example:

      ?COLUMNS % % %

      This will list the columns in every table (as the % represents every schema, every table, and every column respectively)

      ?COLUMNS % CDBObject %

      This will list every column in the CDBObject table.

      ?COLUMNS % CPointAlgManual Current%

      This will list every column that is in the Internal Analog table and has a name that begins with ‘Current’.

      ?COLUMNS % % CurrentState

      This will list the CurrentState columns of every table.

    • Press the CTRL and the Enter keys simultaneously to submit your command.
      QueryPad displays a list of the columns that match the criteria set in your command.

For each column in the list, QueryPad displays:


ClearSCADA 2015 R2