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 first published in March 2006
This Content Component encountered an error

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataCenter

SearchServerVirtualization

SearchCloudComputing

SearchEnterpriseDesktop

Close