How to change a primary key in a record

Hi! I would like to change the primary key in my record and use another field instead (the created field would be a concat() from other two fields).

Even though I have been trying, I´m finding trouble when trying to change the condition of primary key and give it to another field. I don´t want this primary key to be AUTO-INCREMENT and, when I try to put another field as primary key, an error occurs. Is it possible to eliminate the primary key and convert the other one into a primary key?

Otherwise, how can I solve this?

  Discussion posts and replies are publicly visible

Parents Reply
  • Alright. I have to options to continue (for what I´ve searched) and would like your advice:

    1) "Index" another primary key (in this case, I would have 2 primary keys, I don´t know if it is a correct approach)

    2) Eliminate the actual primary key and substitute it for the other one (I remember that when I tried, it gave me an error when trying to eliminate it in the record, there was a warning message of mapping)

    3) Only change the condition of primary key from one field to another (the variable I want to retire from primary key is auto-increment, and the new one isn´t)

Children