The meaning of primary key is the unique identification of a record, similar to the ID of an ID card. The primary key can be a field or a combination of multiple fields. If it is a field, the primary keys of different records or different rows are not allowed to be repeated; if it is a combination of multiple fields, the combination of these fields is not allowed to be the same. . So in your case, as long as the username and bm_URL are not the same at the same time, there will be no conflict.
There can only be one primary key in a table. The primary key is self-increasing and not empty. There can be multiple uniques in the table. It is recommended that you use visual phpadmin or Navicat
Multiple primary keys are called joint primary keys, which can also be called joint primary keys. You can imagine it as a product order table. The user ID in the record can be repeated, and the user ID and order number must be unique together.
The index (index or key) in the database is not specific to one column, so a key can be composed of multiple columns (such as the username and bm_URL you set here). Therefore, the uniqueness of the primary key means that all the columns it contains cannot be repeated together. It does not matter if you repeat the username alone~
What you write like that is a joint primary key. Username can be repeated, but under the same username, bm_URL can be different
The meaning of primary key is the unique identification of a record, similar to the ID of an ID card.
The primary key can be a field or a combination of multiple fields. If it is a field, the primary keys of different records or different rows are not allowed to be repeated; if it is a combination of multiple fields, the combination of these fields is not allowed to be the same. .
So in your case, as long as the username and bm_URL are not the same at the same time, there will be no conflict.
There can only be one primary key in a table. The primary key is self-increasing and not empty. There can be multiple uniques in the table. It is recommended that you use visual phpadmin or Navicat
Multiple primary keys are called joint primary keys, which can also be called joint primary keys. You can imagine it as a product order table. The user ID in the record can be repeated, and the user ID and order number must be unique together.
The index (index or key) in the database is not specific to one column, so a key can be composed of multiple columns (such as the username and bm_URL you set here). Therefore, the uniqueness of the primary key means that all the columns it contains cannot be repeated together. It does not matter if you repeat the username alone~