Questions tagged [unique-index]

Unique-index is an index that sets one or multiple fields to be unique in a data entity

A unique index on a table guarantees that the index key contains no duplicate values and therefore ensures that every row in the table is in some way unique. Specifying a unique index makes sense only when uniqueness is a essential for the data in a table.

A unique index on a field (or set of fields) prevents two records from existing in the table with the same value in the indexed field(s). ServiceNow uses several unique indexes out-of-box to protect certain tables from duplicate record confusion.

333 questions
-2
votes
2 answers

Why oracle doesn't allow creating fk on unique index?

I was trying to create an fk in oracle but ran into ORA-02270 problems. After some googling, I found the reason is that you can't create fk towards unique index. It need to be a unique constraint. I also have read Oracle unique constraint and unique…
lidlesseye
  • 165
  • 9
-3
votes
1 answer

Query to pull all unique indexes from all tables in database using sql

Query to pull all unique indexes from all tables in database using sql. The output should display schema name, table name and column name. I tried the following query: SELECT t.[name] AS TableName ,i.[name] AS IndexName ,c.[name] AS…
Sudr
  • 15
  • 3
-3
votes
1 answer

SQL: using UNIQUE for column pokemon_master_id

EDITED: I recognize that some of you might wonder why I have 2 'id' values in my SQL code. I have addressed why in my particular case it seems to be needed in the comment below this question. Given the following SQL code for creating table…
Webeng
  • 7,050
  • 4
  • 31
  • 59
1 2 3
22
23