SQL - Make an id start with a number depending on the entity type

194 Views Asked by At

In my database I have a User table. I don't represent this in the database but in the implementation of the application I'm working on, there are two types of Users (let's say an A type and a B type).

What I want to do is make the id of an A type user start with a 1 (for example idUser=1016) and a B type user id to start with a 2 (for example idUser=2634).

Is this possible? I've been trying to do this through AUTO_INCREMENT but I'm not too sure how to go about this idea.

0

There are 0 best solutions below