Where to use Primary Key in mySQL?

arronmattwills

New member
Joined
Dec 23, 2013
Messages
322
Points
0
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.
 
Latest threads
Hi
Replies
1
Views
96
Replies
1
Views
96
Replies
1
Views
87
Recommended threads
Replies
2
Views
3,268
fab
Replies
10
Views
3,327
Replies
4
Views
3,136

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