Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Data Archive Reference

Modify the primary key

  • Last UpdatedJan 13, 2023
  • 1 minute read

Most table attributes can be modified in edit mode, using modify and istructure commands. The primary key is an exception. If you wish to change the primary key itself, you must provide the new key value using a special attribute:

  • Use the newtag attribute for the PIPOINT table

  • Use the newset attribute for the PIDS table

For example, to rename the point sinusoid to mysinusoid, you would enter:

$ piconfig
* (Ls - ) piconfig> @table pipoint
* (Ls - PIPOINT) piconfig> @mode edit
* (Ed - PIPOINT) piconfig> @istructure tag,newtag
* (Ed - PIPOINT) piconfig> sinusoid,mysinusoid

The attribute for the new primary key is always:

newPrimary_Name

Some tables do not support renaming of records, for example PIARC and PISNAP tables. Tag is the primary key of these tables. Because Tag is actually a point attribute, you must rename from the PIPOINT table. Other tables have similar relationships.

TitleResults for “How to create a CRG?”Also Available in