faqts : Computers : Programming : Languages : Sql

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

10 of 18 people (56%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Database: Relational:MySql:Key:Primary: Compound: How create compound primary key (multiple column)?

Apr 8th, 2005 07:10
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 22 March 2005 - 06:31 pm ----------------------

Database: Relational:MySql:Key:Primary: Compound: How create compound 
primary key (multiple column)?

---

Use the SQL command

PRIMARY KEY( <your first column name>, <your second column name>, ... )

e.g.

PRIMARY KEY( columnCountryCode, columnId )

---
---

Internet: see also:

---

[Internet: source: http://www.google.com search for 'compound primary 
key relational database create how to mysql': 
http://www.developerfusion.com/scripts/print.aspx?id=3998]

---

Database: Relational: MySql: Link: Overview: Can you give an overview 
of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/35331/fid/52

----------------------------------------------------------------------