GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 147 of 171    Print  
Oracle : Table Level and Column Level constraints
We have two type of constraints - Table Level and Column Level. Which is better and why..?


  
Total Answers and Comments: 6 Last Update: February 20, 2009     Asked by: Sant_parkash 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: sampra
 
constraints are maiainly five
1.not null
2.unique
3primarykey
4.foreignkey
5.check
all colun level constarins only applited to table  



Above answer was rated as good by the following members:
abhilashnanupillai
October 31, 2007 00:58:50   #1  
gemini burj Member Since: October 2007   Contribution: 17    

RE: Oracle : Table Level and Column Level constraints
Dear

If the same constraint is used in coloum leve or table leve then there is no difference in functanality i.e. if you are using primary key ore foreign key for the one column. This kind of constraint could be in table level or column leve and there will be no difference. But if you have to have a primary key and foreign key constraint for the multiple columns then you can not use this constraint in column level thse constraints are to be defined at table level.

 
Is this answer useful? Yes | No
February 14, 2008 05:06:58   #2  
safdar Member Since: September 2007   Contribution: 5    

RE: Oracle : Table Level and Column Level constraints
hi i am safdar dogar
in oracle there are five constraints
not null unique primary key check foreign key
not null always use in column level and foreign key always use in table lavel
but remaing three use column level and table level
both are working in same
am i right

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
February 25, 2008 05:44:07   #3  
gemini burj Member Since: October 2007   Contribution: 17    

RE: Oracle : Table Level and Column Level constraints
Dear

We have restrictions only for not null constraint that this can be sued at columns level only. even you can use foreign key constraint at colum level by using reference statement.

 
Is this answer useful? Yes | No
February 26, 2008 05:13:54   #4  
sampra Member Since: February 2008   Contribution: 278    

RE: Oracle : Table Level and Column Level constraints
constraints are maiainly five
1.not null
2.unique
3primarykey
4.foreignkey
5.check
all colun level constarins only applited to table


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 16, 2008 05:04:09   #5  
krishnaindia2007 Member Since: September 2007   Contribution: 854    

RE: Oracle : Table Level and Column Level constraints
>>We have two type of constraints - Table Level and Column Level. Which is better and why..?

Performance wise there will not be any difference between table level and column level constraints.

Generally we use table level constraint to define composit keys( Constraint on combination of columns). Except not null constraint remaining constraints cane be defined at table table or column level. Not null constraint must be declared as column level constraint only.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
February 20, 2009 03:28:22   #6  
abhilashnanupillai Member Since: February 2009   Contribution: 1    

RE: Oracle : Table Level and Column Level constraints
Constrains are the key word along with create table command. Different type of table constraints are primary key not null unique etc.
 
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