Jump to content


What does "KEY `sourceID` (`sourceID`)" mean?

  • Please log in to reply
1 reply to this topic

#1 coolex

  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 17 September 2006 - 12:40 PM


I saw this MySQL Code in a PHP Script:

CREATE TABLE `transaction` (
  `ID` int(11) NOT NULL auto_increment,
  `sourceID` int(11) NOT NULL default '0',
  'comment' varchar(200),
  KEY `sourceID` (`sourceID`)

I know what a Foreign Key is.
But what does "KEY `sourceID` (`sourceID`)" mean? Is it something like a Foreign key?
Hope you can help me.
Thank you.

#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 17 September 2006 - 02:49 PM

KEY is just a synonym for INDEX.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users