-
please tell me the difference between a table and a view.
what is the advantage of view than a table?
please answer to my question
-
A table stores data. It contains rows that take up space in your database.
A view does not store data. Some people call a view a 'virtual table'. I like to think of them as 'permanent queries'.
When you select data from a view, you are actually executing the query that defines the view. The rows come out of the
underlying table(s).
In short, you can't have views without tables because it is the tables which store the data.
You can create a view like this :
Create view x as
select some_columns
from y
where col1 = 'abc'
So when you 'select * from x', what you get back is the
result of
select some_columns
from y
where col1 = 'abc'
I hope this answers your question...
-John
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|