MySQL Forums
Forum List  »  Newbie

Re: Primary key in table
Posted by: Pete Watters
Date: September 16, 2017 02:40PM

I use social security number as an example of what I thought would be a unique key and I get what you said about it but I just used it as an example.

Lets say I created a column in a Parent table called unique_field varchar(20) and I new the filed would be unique which would also be a data value that had a meaning

in the Parent Table
If I set this as the primary key is that a good practice or should I generate a
primary key and add unique_field as a UNIQUE KEY

Options: ReplyQuote


Subject
Written By
Posted
September 16, 2017 10:22AM
September 16, 2017 01:44PM
Re: Primary key in table
September 16, 2017 02:40PM
September 16, 2017 02:56PM
September 19, 2017 05:08AM
September 20, 2017 11:29AM
September 20, 2017 12:20PM
September 20, 2017 12:42PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.