Q

Data roots when queried through a view

Sybase expert Mich Talebzadeh explains where data is derived from when queried from a view.

When we query data through a view, is the data stored in the view or the table? Is data from a view stored in the database?

A VIEW is a compiled object. Data is always stored in the databases tables and through view you are looking at the underlying data

SELECT a.col1, b.col2 from TABLE_A a, TABLE_B b WHERE a.col3 = b.col4

is equivalent to:

CREATE VIEW a_view
AS
SELECT a.col1, b.col2 from TABLE_A a, TABLE_B b WHERE a.col3 = b.col4

SELECT * FROM a_view

This was last published in March 2006

Dig Deeper on Open source databases

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

SearchServerVirtualization

SearchCloudComputing

SearchEnterpriseDesktop

Close