Skip to content

[Feature] Support show view from table #5812

@xy720

Description

@xy720

Support show view from table:

Syntax:

SHOW VIEW { FROM | IN } table [ FROM db ]

Example:

show view from testDb.test1
show view from test1 from testDb

Result:

+--------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| View         | Create View                                                                                                                                                                                             |
+--------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| test1_view   | CREATE VIEW `test1_view_1` AS SELECT `a` AS `a` FROM `default_cluster:testDb`.`test1`;                                                                                                              |
| t1_t2_view   | CREATE VIEW `t1_t2_view` AS SELECT `test1`.`a` AS `a`, `test1`.`b` AS `b` FROM `default_cluster:canal_test`.`test1`  LEFT OUTER JOIN `default_cluster:testDb`.`test2` ON `test1`.`a` = `test2`.`a`; |
+--------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions