GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL Plus
Go To First  |  Previous Question  |  Next Question 
 SQL Plus  |  Question 22 of 132    Print  
What are the pre-requisites to modify datatype of a column and to add a column with NOT NULL constraint

  
Total Answers and Comments: 3 Last Update: June 19, 2007   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Mukul
 
We can update the datatype of column with ALTER function but the constraints cant be added with the ALTER function if there is data in the table.

Above answer was rated as good by the following members:
madhuyarra
July 29, 2005 10:02:57   #1  
harsha        

RE: What are the pre-requisites to modify datatype of a column and to add a column with NOT NULL constra...
1) to modify datatype of a column - ???
2) to add a column with NOT NULL constraint - the table must have 0 rows

 
Is this answer useful? Yes | No
December 07, 2006 09:36:15   #2  
rampratap409 Member Since: September 2006   Contribution: 111    

RE: What are the pre-requisites to modify datatype of ...

to modify the datatype of a column that should be empty but if increasing the width then it can be done even it holds the value.

to add then not null column the table must be empty if not then add the column as nullable then modify that that column as not null.


 
Is this answer useful? Yes | No
June 19, 2007 08:43:02   #3  
Mukul        

RE: What are the pre-requisites to modify datatype of ...
We can update the datatype of column with ALTER function but the constraints cant be added with the ALTER function if there is data in the table.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
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