Create a unique constraint on an existing table
I have a table that is already created and contains data. I need to create a unique constraint that is a combination of two fields. Is there a way to do this in a SQL statement? Also, I would lke to know how to add it in the table class.
Product version: IRIS 2021.1
Discussion (1)2
Comments
The following SQL should do it
CREATE UNIQUE INDEX ON TABLE <table> (field1, field2)
You will then want to stop all operations against the data and build the index