MySQL Design Customer Table - Customer ID

Posted 3 months ago by Lampone

I hope someone can help me with my Database Design. I have a table customers where all customers are stored, while they can be of a different type. The type would be "client" or "lead", indicating if it is a actual customer or just a lead.

Now i need a unique CustomerId that is auto-incrementing but only for clients and not for leads. I can't take the id since that value is incrementing for clients and leads.

Did someone solve a similar issue before and give me a approach to getting a incrementing customer-number?

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.