Databases Reference
In-Depth Information
Operations on Views
The previous step was done manually; other operations on views are handled by
phpMyAdmin's interface. 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, and this is done with
a
SELECT
statement. However, exporting the view's structure would display how
MySQL internally stored our view:
CREATE ALGORITHM=UNDEFINED DEFINER='marc'@'%' SQL SECURITY DEFINER
VIEW 'books_authors' AS
select 'books'.'isbn' AS 'isbn',
'books'.'title' AS 'title',
'authors'.'author_name' AS 'author_name'
from ('books' left join 'authors' on(('books'.'author_id' =
'authors'.'author_id')));
The menu is more limited, displaying the options that make sense for a view. When
needed, phpMyAdmin generates the appropriate syntax for handling views. For
example, a click on
Drop
would produce:
Search WWH ::
Custom Search