cancel
Showing results for 
Search instead for 
Did you mean: 

how to add a new unique index on a table with data?

Former Member
0 Kudos

Suppose I have a table with some column like:

mytab(id, department, value, .....)

Then I have new request:

1. Add new column ,mynum

2. department + mynum is unique.

The simple solution I want to try is to create unique index on department and mynum.

But ASE won't allow me do it because there are many existing data with no value for new column mynum. For example data maybe like:

Id  department   munum

1   depat1         null

2   depat1         null

3   depat2         null

4   depat2         null

5   depat3         null

6   depat4         null

7   depat5         null

8   depat5         null

9   depat5         null

.....

How to create a index for this ongoing data rule? any other simple solution with coding?

Accepted Solutions (0)

Answers (0)