What is the difference between CREATE INDEX and CREATE UNIQUE INDEX.?

Questions by prafull.vn   answers by prafull.vn

Showing Answers 1 - 11 of 11 Answers

ramiya

  • May 7th, 2006
 

helloi have doubt in where i used create index and unique index.plz replay it immediately

  Was this answer useful?  Yes

Ajeet Singh

  • May 21st, 2006
 

We should create an index if a column contains a wide range of values, a column contains a large number of null values, one or more columns are frequently used together in a WHERE clause or a join condition and the table is large and most queries are expected to retrieve less than 2-4% of the row.

Format of Create Index:

Create Index emp_last_name_idx ON emp (dept_id);

If you want to exforce uniqunes, you should define a unique or primary key constraint in the table definition. then a unique index is created automatially.

Constraint emp_email_uk UNIQUE(email);

  Was this answer useful?  Yes

kanak3

  • Jun 27th, 2007
 

Indexes can be unique or nonunique. Unique indexes guarantee that no two rows of a table have duplicate values in the key column (or columns). Nonunique indexes do not impose this restriction on the column values.

  Was this answer useful?  Yes

JP

  • May 25th, 2014
 

When create primary constraints oracle automatically creates Unique Index .
Using "Create index" by default oracle will create B tree index .
To create other indexes like Bit map,IOT index you need mention the Index name while creating index
ex "create Bitmap index "

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions