mysql - is this possible to made two primary key in one table -


hi want know is possible make primarykey in 1 table in mysql. if yes please tell me concept behind this. because have seen table in 2 primary key there no auto increment set

you can have 1 primary key, but:

  • you can combine more 1 column primary key (maybe it's have seen)
  • the primary key don't needs auto-increment, has unique
  • you can add more 1 index 1 or more colums speed select-statements (but slow down insert / update)
  • those indexes can marked unique, wich means don't let insert second row same content in index-fields (just primary key)

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -