May 2005
Intermediate to advanced
352 pages
14h 39m
English
SHOW CREATE VIEW
SHOW CREATE VIEW viewUse this statement to display an SQL statement that can be used to create a view like the one named. The results may be copied and used with another database. They also could be copied and the name of the view modified so that the statement may be used on the same database. This statement is available as of Version 5.0.1 of MySQL.
SHOW CREATE VIEW employee_directory\G
*************************** 1. row ***************************
Table: employees
Create Table: CREATE VIEW `employee_directory`.`personnel`
(`ID`, `Name` `Ext.`,)
AS SELECT emp_id,
CONCAT(emp_first, ` `, emp_last),
tel_extension
FROM employees;This
view is the same one that is created in the example given for the
CREATE VIEW statement earlier. Notice that the
database name (personnel) has been added to the
end of the view name (employee_directory).
Read now
Unlock full access