What is a view? Why use it?

Answer Posted / babji009

A view is a virtual table made up of data from base
tables and other views, but not stored separately.
Ex:
CREATE VIEW GOOD1_SUPPLIERS
AS SELECT S#, STATUS, CITY
FROM S
WHERE STATUS > 15;
SELECT * FROM GOOD1_SUPPLIERS;

---------+---------+---------+---------+-----------
SELECT * FROM GOOD1_SUPPLIERS;
---------+---------+---------+---------+-----------
S# STATUS CITY
---------+---------+---------+---------+---
S3 40 PARIS
S4 110 LONDON
S8 30 ATHENS
S7 20 U.S.A

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is node in db2?

600


What is the default page size of buffer pools?

639


How do you eliminate duplicate values in db2?

677


How to check last update on table in db2?

622


Mention the way of highlighting as well as putting a cursor to use in a cobol program.

620






Explain package in db2 and its advantages?

586


How to retrieve rows from a db2 table in embedded sql?

712


What is data manager?

596


How can you quickly find out the # of rows updated after an update statement?

622


can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well

1792


What are foreign keys in db2?

607


How can you find out the # of rows updated after an update statement?

631


Can one database have multiple instances?

575


Why do we bind in db2?

610


What is sqlca’s maximum length?

662