Jump to content
Sign in to follow this  
Darkness

Null/Primary Key/Unique Key

Recommended Posts

Hello,Just wondering. Since I couldn't find the answer to my question anywhere, I need to ask: What exactly do these mean? Null, Primary Key, and Unique Key. On the tutorial, it seems like they expect that you know what they mean. I need to know, because I have been doing database management lately, but I don't know what these mean, thus, not sure whether to use them or not.Thanks!

Share this post


Link to post
Share on other sites

Just wondering. Since I couldn't find the answer to my question anywhere, I need to ask: What exactly do these mean? Null, Primary Key, and Unique Keynull means not zero but empty meaning no value at allPrimary Key the primary key is use to represent the identifier of each recordunique means that there should be no same recorr in the field almost same as primary key

Share this post


Link to post
Share on other sites

Oh, I see. So, basically, if you use primary key (id) [or whatever you want to call an ID table], that will make it so the field goes up each time. And unique key would make it so only one person can have that certain ID? As for Null... I sort of get it. Thanks, that all helped a lot. :)

Share this post


Link to post
Share on other sites

Unique just means that every record in the table needs a different value for that field. A primary key is a unique field that is used as an index for the table, but it doesn't necessarily increase automatically. If you set a primary key field as a number, like an integer, then you can give the field the auto_increment option and then it will increase automatically.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...