Diff between view and table
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Diff between view and table

  1. #1
    Join Date
    Dec 2000
    Posts
    95

    Post

    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



  2. #2
    Join Date
    Nov 2000
    Posts
    344
    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
  •  


Click Here to Expand Forum to Full Width