74. Examples - 7

views in oracle

1. Create a view as empview from employee table where
   basic_sal=3000 and job='Clerk'
Q. create view empview as select ename from employee where 
   basic_sal=3000 and job='Clerk     ';


2. Display the result using above view
Q. select * from empview;


3. Drop the above created view
Q. drop view empview;


4. Create a view as empview from employee table with
   basic_sal,empno,ename.
Q. create view empview as select basic_sal,empno,ename
   from employee;


5. Display the result using the above create view
Q. select * from empview;


6. create a view as clientview from client_mast with all
   columns of table
Q. create view clientview as select * from client_mast;


7. Drop the above create empview
Q. drop view empview;

    

No comments:

Post a Comment