Jump to content

Null/Primary Key/Unique Key


Darkness

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!

Link to comment
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

Link to comment
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. :)

Link to comment
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...