|
I really don't know your background so it's hard for me to talk in language you'd understand. If you are familiar with SQL then a table created with a primary key constraint will have a "key". For example CREATE TABLE RYAN (MYKEY CHAR ( 5) NOT NULL WITH DEFAULT, MYDATA CHAR ( 15) NOT NULL WITH DEFAULT, PRIMARY KEY (MYKEY)) With a table set up this way you cannot have two rows in the table with the same value for MYKEY. Also, if you use a HLL language like cobol or rpg you could retrieve records by that key using direct language attributes. If you are familiar with DDS it would be more like UNIQUE R RYANR MYKEY 5A MYDATA 15A K MYKEY The file level keyword UNIQUE says there can only be one row where the fields declared keys by the K (as seen in front of MYKEY) are alike. Now, you could have K fields without UNIQUE. And instead of being like a primary key constraint, it's more like combining a table with an index. Understand? Now, if you do not have any keys, or primary key constraints, then when you retrieve rows from the table they are normally retrieved in the order they were deposited in the file, or, "arrival sequence". Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.