SQL UNIQUE Constraint

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

2 replies · 447 views · started 16 years ago · 1 min read

2 participants
DiL Developer · 142 posts #2

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?

GumSlone Administrator Principal · 1,690 posts #3

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

External image (may be gone)

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close