anandknr
Member
Hello all,
I am writing a query to list all tables with no unique and primary index defined.
Strangely, I couldnt find a single (user added ) table with havePrimary as false. So my question is, Can we have a table with two indexes (A and B), A being unique and B being non unique but primary??
I am writing a query to list all tables with no unique and primary index defined.
Code:
define var havePrimary as logical.
define var haveUnique as logical.
for each _file where _file._tbl-type = "T":
assign haveUnique = can-find(first _Index where _index._file-recid = recid(_file)
and _Index._unique)
havePrimary = can-find (first _index where recid( _index ) = _file._prime-index).
disp haveUnique havePrimary.
end.
Strangely, I couldnt find a single (user added ) table with havePrimary as false. So my question is, Can we have a table with two indexes (A and B), A being unique and B being non unique but primary??