Where to use Primary Key in mySQL?

Joined
Dec 23, 2013
Messages
323
Points
18
Primary is a single unique value which is used to identify in database search results, so that we can simple get our unique value.
Once we write this primary key in mySQL tables then we can write our php code in website.
Every single table in database should contains a primary key.
Primary key is a restriction (condition, limitation or a constraint).
 

AlexBell

New member
Joined
Mar 25, 2014
Messages
22
Points
0
Primary key in that code is create ID column as primary key column. So you can not insert same value which is already exist in that table. SQL just check value when data is inserted into table, if the value is inserted into a primary key column is already exist then SQL cancel insert operation and reject all values.
 
Recommended threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top