we can create a view on a table that really doesn't exist yet we can do this by
putting
a
word (Force) in create view command-
SYNTAX
CREATE FORCE VIEW
<VIEW_NAME>
AS
<SELECT STATEMENT>; -- ASSUMING THE TABLE DOES NOT EXIST
e.g.
CREATE FORCE VIEW DEPARTMENT_FORCE_VW AS
SELECT * FROM DEPARTMENT;
Here view gets created but its status is invalid, it becomes valid when we create table DEPARTMENT
(table on which view is defined).
No comments:
Post a Comment