42. Views
The support for the Views was added in MySQL
TM v.5.0.1.
A View is a virtual table based on the resultset of a SELECT statement but it contains rows, columns and data just like a real table. You can add SQL functions, WHERE, and JOIN statements to a view and present the data as if the data were coming from a single table. So, allowing users to access a set of tables as if it were a single table, views are useful for limiting their access to just that or restrict access to rows (a subset of a particular table).
See Also:
- 41: Tables
- 43: Stored Procedures
- 44: Stored Functions
- 45: Scheduled Events
Creating a View
To create a View:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database you want to create the view in;
- right click on the ''Views'' node and select the ''Create View'' item from the popup menu;
- use the ''View Editor'' (sec. 42.1).
Editing a View
To edit a View:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database which contains the view you want to edit;
- expand the ''Views'' node;
- double click or right click on the view and select the ''Edit View'' item from the popup menu;
- use the ''View Editor'' (sec. 42.1).
Renaming a View
To rename a View:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database which contains the view you want to rename;
- expand the ''Views'' node;
- right click on the view and select the ''Rename View'' item from the popup menu.
Dropping a View
To drop a View:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database which contains the view you want to drop;
- expand the ''Views'' node;
- right click on the view and select the ''Drop View'' item from the popup menu;
- confirm the requested operation.
Multi-Drop of Views
To drop a set of Views:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database which contains the views you want to drop;
- right click on the node ''Views'' and select the ''Multi-Drop of Views'' item from the popup menu;
- use the ''Multi-Drop Wizard'' (chap. 26).
Printing a View
To print a View:
- open the ''Server Object List'' (chap. 16);
- expand the node relating to the database which contains the view you want to print;
- expand the ''Views'' node;
- right click on the view and select the ''Print View'' item from the popup menu;
- use the FastReportTM tool (sec. 73.2).
Copyright © 2007 - 2009 HoneySoftware - All Rights Reserved
Submit feedback on this topic.