trying generate a unique id

UDA

trying generate a unique id

Hello,
I am creating a table cust_shipment with column name as name and id which is auto gnerated.
now i want to insert 100 records. my question is that since terradata works on MPP. does each record get a unique id or like 10 records are inserting at once so these 10 records get same id. plz suggest a way out.

thanks
2 REPLIES
Enthusiast

Re: trying generate a unique id

If your table definition for that column is GENERATED ALWAYS, then, an unique number is generated always.
Enthusiast

Re: trying generate a unique id

Using Generated Always will guarentee 'unique' rows but does not prevent 'duplicate' rows - i.e. rows that are duplicate from the source but are loaded with a unique ID. You will need to factor this into your design. There are limitation of Identity columns - replication etc. There are other methods of generating a unique value that should be inestigated. You should have a good read of the Data Definition reference.

davidpracy