|Navigation: Language Reference > 5 - Declaration Attributes > Variable and Entity Attributes >====== PRIMARY (set relational primary key) ======|
The PRIMARY attribute (PROP:PRIMARY) specifies the KEY is unique, includes all records in the file, and does not allow “null” values in any of the fields comprising the KEY. This is the definition of a file's “Primary Key” per the relational database theory as expressed by E. F. Codd.
Names FILE,DRIVER('TopSpeed'),PRE(Nam) !Declare a file structure
NameKey KEY(Nam:Name),OPT !Declare name key, exclude blanks
NbrKey KEY(Nam:Number),PRIMARY !Declare number key as the primary key