Hi,
I have a hierarchical set of types from which I am implementing tables.
Person
|
User ----- Employer
|
Employee ----- Contact Person
I am trying to create a autonumber column as the identifiying column. But I cannot use the usual method for tables of:
GENERATE ALWAYS AS IDENTITY(START WITH 1,INCREMENT BY 1)
as you can not define this sort of thing within the type definition and you cannot add columns to a table which has been created from a type?!
Therefore, I am considering using the system generated unique object IDs for the indentifying column. However, this is a Varchar(16) value which is rather untidy and unmemorable as it will act the the Employee / Employer / Contact Person IDs I would prefer this to be an integer value.
Is there anyway of making the system generate a sequential value that is an integer as the identifier or is there another way of doing this that I just haven't heard of?
Thanks in advance
Robert Miles
I have a hierarchical set of types from which I am implementing tables.
Person
|
User ----- Employer
|
Employee ----- Contact Person
I am trying to create a autonumber column as the identifiying column. But I cannot use the usual method for tables of:
GENERATE ALWAYS AS IDENTITY(START WITH 1,INCREMENT BY 1)
as you can not define this sort of thing within the type definition and you cannot add columns to a table which has been created from a type?!
Therefore, I am considering using the system generated unique object IDs for the indentifying column. However, this is a Varchar(16) value which is rather untidy and unmemorable as it will act the the Employee / Employer / Contact Person IDs I would prefer this to be an integer value.
Is there anyway of making the system generate a sequential value that is an integer as the identifier or is there another way of doing this that I just haven't heard of?
Thanks in advance
Robert Miles