GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle
Go To First  |  Previous Question  |  Next Question 
 Oracle  |  Question 24 of 81    Print  
what is the difference between CREATE INDEX and CREATE UNIQUE INDEX.?

  
Total Answers and Comments: 4 Last Update: January 31, 2008     Asked by: prafull.vn 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 07, 2006 10:10:48   #1  
ramiya        

RE: what is the difference between CREATE INDEX and CR...
helloi have doubt in where i used create index and unique index.plz replay it immediately
 
Is this answer useful? Yes | No
May 21, 2006 14:41:49   #2  
Ajeet Singh        

RE: what is the difference between CREATE INDEX and CR...

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);


 
Is this answer useful? Yes | No
June 27, 2007 15:50:07   #3  
kanak3 Member Since: November 2005   Contribution: 4    

RE: what is the difference between CREATE INDEX and CR...
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.
 
Is this answer useful? Yes | No
January 31, 2008 07:06:23   #4  
Sant_parkash Member Since: October 2007   Contribution: 26    

RE: what is the difference between CREATE INDEX and CREATE UNIQUE INDEX.?
Index will only help you in searching the data but unique index will provide uniqueness to the indexed column. But in both the cases NULL values are allowed to insert.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape