Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

Multiple Primary Keys
(1 viewing) (1) Guest
All your queries regarding
MySQL Installation,
Learning MySQL DBA,
and tonnes more... will be solved in this forum
  • Page:
  • 1
TOPIC:

Multiple Primary Keys

Multiple Primary Keys 9 months, 4 weeks ago #722

  • nikhil
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
  • Karma: 1
Hello,

In MYSQL,my database name is customerdetails, and in that databse, table name is personelinfo. And i want to have multiple primary keys in a single table. Is it possible to do it in MySQL?

Thanx in advance..

Re: Multiple Primary Keys 9 months, 3 weeks ago #747

  • yoko
You can only have one primary key, but you can have multiple columns in your primary key.

You can also have Unique Indexes on your table, which will work a bit like a primary key in that they will enforce unique values, and will speed up querying of those values.
  • Page:
  • 1
Time to create page: 2.16 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download