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
Replies
1
Views
76
Replies
0
Views
93
Replies
0
Views
154
Replies
3
Views
381
Recommended threads
Replies
6
Views
4,841
Replies
3
Views
5,210
wms
Replies
2
Views
3,454
Replies
4
Views
2,228

Latest postsNew 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