Results 1 to 3 of 3

Thread: What is a view??

  1. #1
    Join Date
    May 2005
    Posts
    15

    What is a view??

    What is the purpose of a view???? How do I use it??? And is it only available in Mysql 5.0???

  2. #2
    Join Date
    Mar 2003
    Posts
    468
    views are many different things depending how they are used.
    the most basic explanation is that a view is another database strucutre, much like a table, that when queried returns rows from the table or set of tables from a pre-defined query. So a view is basically a pre-defined SQL statement that acdesses a set of tables.

    for instance a view is created by :
    create view my_view as select a.*, b.* from a, b where a.id = b.id

    the use of views can be for simplicity (not having to remember the underlying SQL) or as a security measure to hide specific columns from a table from a set of users.
    for instance you may have a view the calculates and returns a bonus for each employee. but you may not want to allow users to see the pay rate or salary of each employee.

    hope this helps.

  3. #3
    Join Date
    Sep 2002
    Posts
    5,938
    View is available in most rdbms except earlier version of MySql.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •