3 messages in com.mysql.lists.mysqlcreate unique index| From | Sent On | Attachments |
|---|---|---|
| Scott Purcell | 28 Jun 2005 06:36 | |
| mfat...@free.fr | 28 Jun 2005 07:06 | |
| Alec...@Quantel.Com | 28 Jun 2005 07:09 |
| Subject: | create unique index![]() |
|---|---|
| From: | Scott Purcell (spur...@vertisinc.com) |
| Date: | 06/28/2005 06:36:15 AM |
| List: | com.mysql.lists.mysql |
Hello,
I am reading the docs, but I am slightly confused.
I have a table with a varchar(50) column (not a primary column) where I do not
want duplicates. It is a properties column, and I am getting duplicates
inserted, which is causing problems in my display.
An Oracle DBA that works with me suggested creating a unique index on the
column. I am reading the docs here:
http://dev.mysql.com/doc/mysql/en/create-index.html
but I am not have a clear understanding of an index, so I am having trouble
visualizing what I need to do. The column already exists.
I am running 4.0.15 on a PC. The current column type is: MyISAM. I am not sure
if that is proper or not. Its usage is for a web-site.
Here is what I created a while back: CREATE TABLE PROPERTIES ( property varchar(50), value varchar(200), description varchar(200) ) TYPE=MyISAM;
Also, if this is doable, can I also create an index across two columns? I have
another situation where I need a combination of two columns to be unique.
Thanks, Scott




