Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL
Author Message
spyrule
Worker
Worker



Joined: Jun 06, 2006
Posts: 105

PostPosted: Fri Aug 24, 2007 2:04 pm Reply with quote

Hello,

I am just wondering if it's possible to have a unique AND primary key'd column in a table?
 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Fri Aug 24, 2007 3:29 pm Reply with quote

A primary key is already a unique key.

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
djmaze
Subject Matter Expert



Joined: May 15, 2004
Posts: 727
Location: http://tinyurl.com/5z8dmv

PostPosted: Fri Aug 24, 2007 7:03 pm Reply with quote

yes one column can be primary and another unique.
You could even use multiple columns to make a combination primary or unique

_________________
$ mount /dev/spoon /eat/fun auto,overclock 0 1
ERROR: there is no spoon
http://claimedavatar.net/ 
View user's profile Send private message Visit poster's website
spyrule







PostPosted: Fri Aug 24, 2007 7:25 pm Reply with quote

Thank you evaders99, that makes total sense.

thank you too djmaze, however I was referring to a SINGLE column of data, not multiples.

Thank you both,

Spyrule.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> MySQL

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©