Jump to content

[SOLVED] Auto Increment on multiple primary keys from different tables - InnoDB


yandoo

Recommended Posts

A table can have ONE primary key

 

A table can have ONE auto_increment column which must be defined as a key (so it is normally the PK)

 

Each table should have a primary key.

 

If you want to make each table's PK an auto_inc column then that's fine.

Brilliant thanks!

I was worried that interactions of different records from different tables with auto number Primary keys may some how get confussed...

 

I know this probably seems like a silly question but is there some way i could have a auto incremented code?? Like Product1, Product2, etc.) as  primary key of a table???

 

Only auto increment in phpmyadmin only works with INT...not VARCHAR.. 

 

Thanks :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.