Hello Friends, Actually i have a question about UNIQUE KEY Constraint in our SQL . I want to use more than one value as a UNIQUE KEY .
Can I do this ?
Started on the old forum in January 2010 · view the original in the archive · old links redirect here
Hello Friends, Actually i have a question about UNIQUE KEY Constraint in our SQL . I want to use more than one value as a UNIQUE KEY .
Can I do this ?
look this table
CREATE TABLE `users` (
`id` int(10) NOT NULL default '',
`nick` varchar(20) NOT NULL default '',
`pass` varchar(50) NOT NULL default '',
`emailad` varchar(200) NOT NULL default '',
`sitead` varchar(200) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `nick` (`nick`)
);
In this table UNIQUE KRY is nick
and i want to use nick as wel as emailad and sitead as an UNIQUE KEY
Can anybody tell me that is this posibal or not?
go to phpMyAdmin, -> table structure remove the unique nick, then select the nick and email row on the left side and click the unique icon at the bottom of the table structure.
Advertise your mobile site for FREE with AdTwirl