I have a question regarding the function of the primary key and the unique action for databases.
I have a membership database in which a userid is auto_incremented whenever a new member is put in to the database. The userid field is listed as a primary and unique key field...but what exactly does it mean?
Also, is it possible to take the userid of a member, and place the same userid into a second table that matches the same field?
Example: The membership table has the userid, first name, last name and email fields. The surname table has mem_id, surname and email fields.
I would like to compare the email field from the membership table and the surname table. If the email fields match, I want to take the userid field and input the same value into the mem_id field of the second table. Is this possible?
Thanks in advance!