I'm new to HeidiSQL and can't seem to find a manual. How can I make a field unique from inside the client? I see this post here describing the SQL statement that I need. Is there a way to do this in the client with a check mark or something? Is it also possible to call a SQL statement from within HeidiSQL that would accomplish my goal?
Asked
Active
Viewed 3,369 times
1 Answers
5
Click on the table you want to alter. There is a tab called "Indexes" there. Add a new index. Add the column you want to make unique to this index. Under "Type / Length", select UNIQUE. Then save.
![](../../users/profiles/1822403.webp)
vitorsdcs
- 672
- 7
- 31
-
I made my TINYTEXT field UNIQUE using your suggestion. But upon saving received SQL error 1170 about needing a key length. I tried changing my field to CHAR(100) and that seemed to work ok. Is UNIQUE not appropriate for TINYTEXT fields? – mitch Aug 26 '14 at 14:26