Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Alter table add index
Fri, Aug 24 2012 12:14 PMPermanent Link

Marcel

Hello,
Does someone can tell me what's wrong with this code:

Alter TABLE Vendors
ADD INDEX vendeornameIDX if not EXISTS ON Vendors (Name) COMPRESS FULL

I am just trying to add an index into a existing table.

Thank you for your help

Marcel
Fri, Aug 24 2012 5:43 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Marcel,

Indexes are created with the CREATE INDEX statement, not ALTER TABLE.
In your case, it should be:

CREATE INDEX IF NOT EXISTS vendeornameIDX ON Vendors(Name) COMPRESS FULL

--
Fernando Dias
[Team Elevate]
Fri, Aug 24 2012 6:55 PMPermanent Link

Marcel

Hello Fernando,
Thank you.
It works.

marcel
Image