


Information about the structure of the primary key can be retrieved from the table 'domain.columns'. In the column 'keypos', all key columns of tables contain an entry not equal to the NULL value.
Since a key can consist of several columns, the key columns should be ordered when being retrieved.
SELECT columnname,mode,datatype,codetype,len,dec,
columnprivileges,default,keypos
FROM domain.columns
WHERE keypos IS NOT NULL
ORDER BY keypos



