sandysuy
sandysuy

Reputation: 3

How to make numbers that are always in sequence with postgresql or prisma?

code number description
A123 1 .......................
A123 2 .......................
A123 3 .......................

I have a table in PostgreSQL with code A123, and column "number" with sequence, if i remove row with "number" value 2, the result is :

code number description
A123 1 ...............
A123 3 ...............

How to get the numbers back in order with postgresql or prisma ?

expected : numbers value become 1 & 2 :

code number description
A123 1 .......................
A123 2 .......................

Upvotes: 0

Views: 46

Answers (0)

Related Questions