简体   繁体   中英

Auto Increment By Group

I search everywhere. I don't find my want.

I want table_schema like this:

在此处输入图片说明

What I think you really want, then, is another table. You want one table for the grp and another for the name.

The grp table would have an id (let's call it grp_id ), which is included in the name name. This id can be an auto-incremented integer. It would also have the name of the group.

The name table would have an id (let's call it name_id ). This would also be an auto-incremented integer. This would have the name of the animal. You would need to join to the grp table to get the name of the group.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM