kalpeshrmopkarCreation of "force view" is not sufficing the purpose.
Why not?
Here's an example: I'm creating a table, a function that selects from that table, and a view that uses a function:
SQL> create table a1_brisime (col number);
Table created.
SQL> create or replace function f_brisime
2 return number as
3 retval number;
4 begin
5 select count(*) into retval from a1_brisime;
6 return retval;
7 end;
8 /
Function created.
SQL> create or replace force view v1_brisime as
2 select 1 col from dual union
3 select f_brisime from dual;
View created.
SQL> select * From v1_brisime;
COL
----------
0
1
Now I'll drop the table:
SQL> drop table a1_brisime;
Table dropped.
SQL> select * from v1_brisime;
select * from v1_brisime
*
ERROR at line 1:
ORA-04063: view "SCOTT.V1_BRISIME" has errors
Obviously, I can't use the view any more.
I'll recreate the view anyway:SQL> create or replace force view v1_brisime as
2 select 1 col from dual union
3 select f_brisime from dual;
Warning: View created with compilation errors.
SQL> show err view v1_brisime
Errors for VIEW V1_BRISIME:
LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0 ORA-06575: Package or function F_BRISIME is in an invalid state
The view *WAS* created (but I can't use it until I fix those errors):SQL> select view_name, text_length from user_views where view_name = 'V1_BRISIME';
VIEW_NAME TEXT_LENGTH
------------------------------ -----------
V1_BRISIME 57
SQL> select * from v1_brisime;
select * from v1_brisime
*
ERROR at line 1:
ORA-04063: view "SCOTT.V1_BRISIME" has errors
OK then, I'll recreate the table and I'm up and running again:SQL> create table a1_brisime (col number);
Table created.
SQL> select * from v1_brisime;
COL
----------
0
1
So, why exactly do you think that FORCE VIEW doesn't satisfy your needs? Documentation saysOracleSpecify FORCE if you want to create the view regardless of whether the base tables of the view or the referenced object types exist or the owner of the schema containing the view has privileges on them. These conditions must be true before any SELECT, INSERT, UPDATE, or DELETE statements can be issued