Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unique

Status
Not open for further replies.

filipel

Programmer
Aug 13, 2007
42
PT
How can i define in mysql table that a field is unique??
 
Hi

Code:
[gray]-- each has to be unique in its own[/gray]
[b]create[/b] [b]table[/b] first (
  one integer [b]unique[/b] [b]key[/b],
  two integer [b]unique[/b] [b]key[/b]
);

[gray]-- must be unique together[/gray]
[b]create[/b] [b]table[/b] second (
  one integer,
  two integer,
  [b]unique[/b] [b]key[/b] (one,two)
);

Feherke.
 
yes but on mysql table editor doesnt work?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top