Database Reference
In-Depth Information
This creation step was completed manually. Other operations on views are handled
by the phpMyAdmin interface.
Right panel and views
As a view has certain similarities with a table, its name is available in the navigation
panel, along with the names of the ordinary tables. On clicking the view name, a
panel similar to the one seen for tables is displayed, but with fewer menu tabs than
seen in a normal table. Indeed, some operations do not make sense on a view—for
example, Import . This is because a view does not actually contain data. However,
other actions, such as Browse , are perfectly acceptable.
Let's browse this view:
We notice that, in the generated SQL query, we do not see our original CREATE
VIEW statement. The reason is that we are selecting from the view using a SELECT
statement, hiding the fact that we are pulling data from a view. However, exporting
the view's structure would show how MySQL internally stored our view.
CREATE ALGORITHM=UNDEFINED DEFINER='marc'@'%' SQL SECURITY DEFINER
VIEW `book_author` AS
select `book`.`isbn` AS 'isbn',
`book`.`title` AS 'title',
`author`.`name` AS 'name'
from (`book` left join `author` on((`book`.`author_id` = `author`.
`id`)));
 
Search WWH ::




Custom Search