Where to use Primary Key in mySQL?

arronmattwills

New member
Joined
Dec 23, 2013
Messages
323
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
4
Views
27
Replies
2
Views
40
Replies
5
Views
37
Recommended threads
Replies
2
Views
3,613
Replies
26
Views
21,727
Replies
16
Views
5,268

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