Unique value for records

Ciao!

I have to store an unique value for every record in my customer table.
I used this escamotage:


Is there a better way to do that?
Grazie
GM

That’s 1 way

Another would be hitting an api to generate a uuid and saving that to the record

https://www.uuidtools.com/api/generate/timestamp-first
2 Likes

What structure are you looking for? Example: 7t89-G14L

1 Like

Thanks.

No matter about the structure…
But, in your example, how we can assure the univocity of the “account number”?

A simple method would be to initialize a variable to 1 or 10000 or something like that and add 1 to it before you create each row. And then use that as the unique record ID.

1 Like

This is for creating a unique ID. For an account number use Tatiang’s method.

1 Like

Best to use Supabase

2 Likes

Are you creating rows in a local table or a cloud environment? Most DBs have this value available on records already.

Just was wondering about my question there

1 Like

Google sheets…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.