GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 167 of 241    Print  
Force View
What is Force View. Why Oracle Give Facility to create force view? What is the use of force View


  
Total Answers and Comments: 5 Last Update: October 29, 2009     Asked by: nitin_kumat 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 26, 2007 18:37:13   #1  
DevPro        

RE: Force View

Force View does forces the creation of a View even when the View will be invalid. NoForce Is the default.

CREATE FORCE VIEW <view_name> AS
<select statement>;
-- assuming the table xyz does not exist

CREATE FORCE VIEW view_force AS
SELECT * FROM xyz;

-- ignore the error message

col object_name format a30

SELECT object_name status
FROM user_objects
WHERE object_type 'VIEW';


 
Is this answer useful? Yes | No
March 27, 2007 05:35:07   #2  
hindol_saha Member Since: March 2007   Contribution: 15    

RE: Force View
force view is use basically for the situation when we create a view using a table but the table is not created at that time we use force command;
 
Is this answer useful? Yes | No
March 27, 2007 05:36:33   #3  
hindol_saha Member Since: March 2007   Contribution: 15    

RE: Force View
view is created with out base table that situation we use FORCE
 
Is this answer useful? Yes | No
October 26, 2009 13:34:47   #4  
radheshyambidada Member Since: October 2009   Contribution: 1    

RE: Force View
Creates the view regardless of whether or not the base tables exist

--Radhey

 
Is this answer useful? Yes | No
October 29, 2009 10:56:25   #5  
vanishavadlya Member Since: October 2009   Contribution: 3    

RE: Force View
A view can be created even if the defining query of the view cannot be executed as long as the CREATE VIEW command has no syntax errors. We call such a view a view with errors. For example if a view refers to a non-existent table or an invalid column of an existing table or if the owner of the view does not have the required privileges then the view can still be created and entered into the data dictionary. You can only create a view with errors by using the FORCE option of the CREATE VIEW command: CREATE FORCE VIEW AS ...;When a view is created with errors Oracle returns a message and leaves the status of the view as INVALID. If conditions later change so that the query of an invalid view can be executed then the view can be recompiled and become valid. Oracle dynamically compiles the invalid view if you attempt to use it
 
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