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 4,566 times
2 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.

vitorsdcs
- 682
- 7
- 32
-
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
0
- Double click on your table
- Select Indexes tab , under Type/Length select Unique
- Drag the column to that index ,which you want to make unique
- click on save

Mamatha RY
- 1
- 2