Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you make a field unique from within HeidiSQL

Tags:

heidisql

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?

like image 597
mitch Avatar asked Sep 03 '25 03:09

mitch


1 Answers

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.

like image 180
vitorsdcs Avatar answered Sep 05 '25 00:09

vitorsdcs