SHOW CREATE VIEW

SHOW CREATE VIEW view_name

The SHOW CREATE VIEW statement returns the CREATE VIEW statement used to create the specified view. To use this statement, you must have the SHOW VIEW privilege and the SELECT privilege on that view.

For more information, see the MySQL documentation: SHOW CREATE VIEW Statement.